def METHOD_NAME(src_dir, obj_patterns, target_dir, opts):
    def file_matches(files, root, basenames, patterns):
        files.extend(
            [
                os.path.normpath(os.path.join(root, n))
                for n in basenames
                for pat in patterns
                if fnmatch(n, pat)
            ]
        )
    files = []
    # Change directories so use relative rather than
    # absolute paths. This speeds up things, and allows
    # main() to write to a relative-path destination.
    cwd = os.getcwd()
    os.chdir(src_dir)
    if opts["do_compile"]:
        compiled_version = opts["compiled_version"]
        if compiled_version and PYTHON_VERSION_TRIPLE[:2] != compiled_version:
            sys.stderr.write(
                "Not compiling: desired Python version is %s "
                "but we are running %s\n" % (compiled_version, version_tuple_to_str)
            )
        else:
            for root, dirs, basenames in os.walk(src_dir):
                file_matches(files, root, basenames, PY)
                for sfile in files:
                    py_compile.compile(sfile)
                    pass
                pass
            files = []
            pass
        pass
    for root, dirs, basenames in os.walk("."):
        # Turn root into a relative path
        dirname = root[2:]  # 2 = len('.') + 1
        file_matches(files, dirname, basenames, obj_patterns)
    if not files:
        sys.stderr.write("Didn't come up with any files to test! Try with --compile?\n")
        exit(1)
    os.chdir(cwd)
    files.sort()
    if opts["start_with"]:
        try:
            start_with = files.index(opts["start_with"])
            files = files[start_with:]
            print(">>> starting with file", files[0])
        except ValueError:
            pass
    output = open(os.devnull, "w")
    # output = sys.stdout
    print(time.ctime())
    print("Source directory: ", src_dir)
    cwd = os.getcwd()
    os.chdir(src_dir)
    try:
        for infile in files:
            disassemble_file(infile, output)
            if opts["do_verify"]:
                pass
            # print("Need to do something here to verify %s" % infile)
            # msg = verify.verify_file(infile, outfile)
        # if failed_files != 0:
        #     exit(2)
        # elif failed_verify != 0:
        #     exit(3)
    except (KeyboardInterrupt, OSError):
        print()
        exit(1)
    os.chdir(cwd)
    # if test_opts['rmtree']:
    #     parent_dir = os.path.dirname(target_dir)
    #     print("Everything good, removing %s" % parent_dir)
    #     shutil.rmtree(parent_dir)