def METHOD_NAME(args):
    """
    Handles the command line arguments
    args is the list of arguments passed
    return (int): value to return to the OS as program exit code
    """
    parser = argparse.ArgumentParser(description="drift correction for MIMAS")
    parser.add_argument("--roi", dest="roi", required=True,
                        help="e-beam ROI positions (ltrb, relative to the SEM "
                             "field of view)")
    parser.add_argument("--dwell", dest="dwell_time", type=float,
                        default=10e-06, help="(s) FIB stays for this much duration while scanning")
    parser.add_argument("--nb", dest="nb_images", type=int,
                        default=10, help="total images acquired for drift correction")
    parser.add_argument("--delay", dest="delay_time", type=int,
                        default=5, help="(s) time duration between the acquisition of "
                                        "consecutive images")
    parser.add_argument(dest="base",
                        help="filename of the image to be stored")
    options = parser.parse_args(args[1:])
    escan = None
    detector = None
    try:
        # find components by their role
        for c in model.getComponents():
            if c.role == "e-beam":
                escan = c
            elif c.role == "se-detector":
                detector = c
        if not all([escan, detector]):
            logging.error("Failed to find all the components")
            raise KeyError("Not all components found")
        # Make the blanker automatic (ie, disabled when acquiring)
        escan.blanker.value = None
        # Calculate row and column drift after drift correction
        row_drift, col_drift = calculate_drift(escan, detector, options)
        escan.blanker.value = True
        logging.info("col drift is : %s", col_drift)
        logging.info("row drift is : %s", row_drift)
    except:
        # Make sure the blanker is activated if there is an exception
        if escan is not None:
            escan.blanker.value = True
        logging.exception("Unexpected error while performing action.")
        return 127