def METHOD_NAME(argv=sys.argv):
    threshold = 2
    connectedness = 4
    quiet = False
    src_filename = None
    dst_filename = None
    driver_name = None
    mask = "default"
    argv = gdal.GeneralCmdLineProcessor(argv)
    if argv is None:
        return 0
    # Parse command line arguments.
    i = 1
    while i < len(argv):
        arg = argv[i]
        if arg == "-of" or arg == "-f":
            i = i + 1
            driver_name = argv[i]
        elif arg == "-4":
            connectedness = 4
        elif arg == "-8":
            connectedness = 8
        elif arg == "-q" or arg == "-quiet":
            quiet = True
        elif arg == "-st":
            i = i + 1
            threshold = int(argv[i])
        elif arg == "-nomask":
            mask = "none"
        elif arg == "-mask":
            i = i + 1
            mask = argv[i]
        elif arg == "-mask":
            i = i + 1
            mask = argv[i]
        elif arg[:2] == "-h":
            return Usage()
        elif src_filename is None:
            src_filename = argv[i]
        elif dst_filename is None:
            dst_filename = argv[i]
        else:
            return Usage()
        i = i + 1
    if src_filename is None:
        return Usage()
    return gdal_sieve(
        src_filename=src_filename,
        dst_filename=dst_filename,
        driver_name=driver_name,
        mask=mask,
        threshold=threshold,
        connectedness=connectedness,
        quiet=quiet,
    )