def METHOD_NAME():
    parser = ArgumentParser(
        description="Merge multiple archives into a single library")
    parser.add_argument(
        '-v', '--verbose', dest='verbose', action='store_true', default=False)
    parser.add_argument(
        '-o', '--output', dest='output', required=True,
        help='The output file. stdout is used if not given',
        type=str, action='store')
    parser.add_argument(
        '-L', dest='search_paths',
        help='Paths to search for the libraries along', action='append',
        nargs=1)
    parser.add_argument(
        '--ar', dest='ar_exe', required=False,
        help='The ar executable to use, finds \'ar\' in the path if not given',
        type=str, action='store')
    parser.add_argument(
        '--use-libtool', dest='use_libtool', action='store_true', default=False)
    parser.add_argument(
        '--libtool', dest='libtool_exe', required=False,
        help='The libtool executable to use, finds \'libtool\' in the path if not given',
        type=str, action='store')
    parser.add_argument(
        'archives', metavar='archives',  nargs='+',
        help='The archives to merge')
    args = parser.parse_args()
    ar_exe = args.ar_exe
    if not ar_exe:
        ar_exe = distutils.spawn.find_executable('ar')
    if not ar_exe:
        print_and_exit("failed to find 'ar' executable")
    if args.use_libtool:
        libtool_exe = args.libtool_exe
        if not libtool_exe:
            libtool_exe = distutils.spawn.find_executable('libtool')
        if not libtool_exe:
            print_and_exit("failed to find 'libtool' executable")
    if len(args.archives) < 2:
        print_and_exit('fewer than 2 inputs provided')
    archives = [find_and_diagnose_missing(ar, args.search_paths)
                for ar in args.archives]
    print ('Merging archives: %s' % archives)
    if not os.path.exists(os.path.dirname(args.output)):
        print_and_exit("output path doesn't exist: '%s'" % args.output)
    global temp_directory_root
    temp_directory_root = tempfile.mkdtemp('.libcxx.merge.archives')
    files = []
    for arc in archives:
        execute_command_verbose([ar_exe, 'x', arc],
                                cwd=temp_directory_root, verbose=args.verbose)
        out = execute_command_verbose([ar_exe, 't', arc])
        files.extend(out.splitlines())
    if args.use_libtool:
        files = [f for f in files if not f.startswith('__.SYMDEF')]
        execute_command_verbose([libtool_exe, '-static', '-o', args.output] + files,
                                cwd=temp_directory_root, verbose=args.verbose)
    else:
        execute_command_verbose([ar_exe, 'rcs', args.output] + files,
                                cwd=temp_directory_root, verbose=args.verbose)