def METHOD_NAME(args):
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("dsm", help="Digital surface model (DSM) image file name")
    parser.add_argument("output_dir",
                        help="Output directory for cropped pansharpened images "
                             "(*_crop_pansharpened_processed.tif)")
    parser.add_argument("--pan", help="PAN image file name and optional RPC for it",
                        nargs="+", required=True)
    parser.add_argument("--msi", help="MSI image file name and optional RPC for it",
                        nargs="+", required=True)
    args = parser.parse_args(args)
    files = {}
    files['pan'] = {}
    files['msi'] = {}
    files['pan']['image'] = args.pan[0]
    if (len(args.pan) > 1):
        files['pan']['rpc'] = args.pan[1]
    files['msi']['image'] = args.msi[0]
    if (len(args.msi) > 1):
        files['msi']['rpc'] = args.msi[1]
    # Create the output directory if it doesn't already exist
    try:
        os.mkdir(args.output_dir)
    except FileExistsError as e:
        pass
    crop_and_pansharpen(args.dsm, files, args.output_dir)