def lock_carriage_move_elevator(speed: float) -> InstantCommand:
    def move():
        RobotMap.lifter_component.set_carriage_speed(-1)
        RobotMap.lifter_component.set_elevator_speed(speed)

    return InstantCommand(move)
def move_down_instant() -> InstantCommand:
    target_position = LifterComponent.positions[
        RobotMap.lifter_component.prev_position()]
    return InstantCommand(
        lambda: RobotMap.lifter_component.lift_to_distance(target_position))
def toggle_spread() -> InstantCommand:
    return InstantCommand(
        lambda: RobotMap.gripper_component.toggle_spread_state())
def move_to_position_instant(position: str) -> InstantCommand:
    return InstantCommand(lambda: RobotMap.lifter_component.lift_to_distance(
        LifterComponent.positions[position]))
def spread() -> InstantCommand:
    return InstantCommand(
        lambda: RobotMap.gripper_component.set_spread_state(True))
def close() -> InstantCommand:
    return InstantCommand(
        lambda: RobotMap.gripper_component.set_spread_state(False))
def stop() -> InstantCommand:
    return InstantCommand(
        lambda: RobotMap.gripper_component.set_motor_speeds(0, 0))
def move_left_right(speed: float) -> InstantCommand:
    return InstantCommand(
        lambda: RobotMap.gripper_component.set_motor_speeds(speed, speed))
def spit() -> InstantCommand:
    return InstantCommand(
        lambda: RobotMap.gripper_component.set_motor_speeds(-1, -1))
def stop() -> InstantCommand:
    return InstantCommand(lambda: RobotMap.climb_component.stop())
def set_low_gear() -> InstantCommand:
    return InstantCommand(RobotMap.driver_component.set_low_gear)
def curve_drive(linear: float, angular: float) -> InstantCommand:
    return InstantCommand(
        lambda: RobotMap.driver_component.set_curve(linear, angular))
def toggle_gear() -> InstantCommand:
    return InstantCommand(RobotMap.driver_component.toggle_gear)