def METHOD_NAME():
    parser = argparse.ArgumentParser(description='Simple tool to semi-automatically update the calibration delta of a YARP-based robot.')
    parser.add_argument('-i', '--input', type=str, required=True, help='Path to the input xml file containing the calibration deltas')
    parser.add_argument('-o', '--output', type=str,
                        required=True, help='Path to the output xml file containing the calibration deltas')
    parser.add_argument('-p', '--part', type=str, required=True,
                        help='Name of the group will be loaded in the configuration file. For instance  left_leg or right_leg.')
    parser.add_argument('--config', type=str, required=False,
                        help='Path to the configuration file loaded by the application. '
                        'By default the blf-calibration-delta-updater uses YARP ResourceFinder '
                        'to locate a file named blf-calibration-delta-updater-options.ini',
                        default="blf-calibration-delta-updater-options.ini")
    args = parser.parse_args()
    # check if the input file exists
    if not os.path.isfile(args.input):
        raise RuntimeError('The file path ' + args.input + ' does not exist')
    output_dir = os.path.dirname(args.output)
    if output_dir and not os.path.isdir(output_dir):
        raise RuntimeError('The directory named ' + os.path.dirname(args.output)  + ' does not exist')
    # get the original offset
    tree = etree.parse(args.input)
    root = tree.getroot()
    offsets = get_offsets(root)
    # load the parameter handler
    handler, expected_values, joints_list, tolerances = parse_handler(args.config, args.part)
    # Open the sensorbridge
    control_board, sensor_bridge = open_polydriver(handler)
    new_offsets = []
    for i, joint in enumerate(joints_list):
        key = ""
        while key != 'y' and key != 'n':
            print_info("Do you want to calibrate the joint named: " + joint + " [y|n]")
            key = input()
            if key == 'n':
                new_offsets.append(0)
            elif key == 'y':
                print_info("Please move the joint in the expected configuration. Press enter when you are ready.")
                input()
                new_offsets.append(compute_joint_offset(sensor_bridge, i, expected_values, tolerances))
    updated_offset = np.array(offsets) + np.array(new_offsets)
    print_info("Previous offsets = " + str(['%.4f' % offset for offset in offsets]) + " deg")
    print_info("New offsets = " + str(['%.4f' % offset for offset in updated_offset]) + " deg")
    # Update the configuration file
    key = ""
    while key != 'y' and key != 'n':
        print_info("Do you want to replace the new offset to the existing one? [y|n]")
        key = input()
        if key == 'n':
            print_info("Offset not changed")
        elif key == 'y':
            root = set_offsets(root, updated_offset)
            with open(args.output, 'bw') as f:
                f.write(prettify(root))
            print_info("Offset changed")