<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def main():
 """ A CLI application for performing factory calibration of an Opentrons robot Instructions: - Robot must be set up with two 300ul or 50ul single-channel pipettes installed on the right-hand and left-hand mount. - Put a GEB 300ul tip onto the pipette. - Use the arrow keys to jog the robot over slot 5 in an open space that is not an engraving or a hole. - Use the 'q' and 'a' keys to jog the pipette up and down respectively until the tip is just touching the deck surface, then press 'z'. This will save the 'Z' height. - Press '1' to automatically go to the expected location of the first calibration point. Jog the robot until the tip is actually at the point, then press 'enter'. - Repeat with '2' and '3'. - After calibrating all three points, press the space bar to save the configuration. - Optionally, press 4,5,6 or 7 to validate the new configuration. - Press 'p' to perform tip probe. Press the space bar to save again. - Press 'm' to perform mount calibration. Press enter and then space bar to save again. - Press 'esc' to exit the program. """

    prompt = input(
        ">>> Warning! Running this tool backup and clear any previous "
        "calibration data. Proceed (y/[n])? ")
    if prompt not in ['y', 'Y', 'yes']:
        print('Exiting--prior configuration data not changed')
        sys.exit()
    # Notes:
    #  - 200ul tip is 51.7mm long when attached to a pipette
    #  - For xyz coordinates, (0, 0, 0) is the lower-left corner of the robot
    cli = CLITool(
        point_set=get_calibration_points(),
        tip_length=51.7)
    hardware = cli.hardware
    backup_configuration_and_reload(hardware)
    if not feature_flags.use_protocol_api_v2():
        hardware.connect()
        hardware.turn_on_rail_lights()
        atexit.register(hardware.turn_off_rail_lights)
    else:
        hardware.set_lights(rails=True)
    cli.home()
    # lights help the script user to see the points on the deck
    cli.ui_loop.run()
    if feature_flags.use_protocol_api_v2():
        hardware.set_lights(rails=False)
    print('Robot config: \n', cli._config)