def METHOD_NAME():
    """
    Extract npm packages
    """
    parser = ArgumentParser(description="Extract npm packages")
    parser.add_argument("--src", action="append", default=[], metavar="SRC", help="The ngeo source file")
    parser.add_argument("--dst", metavar="DST", help="The destination file")
    parser.add_argument("excludes", nargs="*", metavar="EXCLUDE", help="The npm package to exclude")
    args = parser.parse_args()
    packages = {}
    for src_ in args.src:
        with open(src_) as src:
            input_data = json.loads(src.read())
            packages.update(input_data.get("devDependencies", {}))
            packages.update(input_data.get("dependencies", {}))
    for package in args.excludes:
        used = False
        if package[0] == "@" and "/" not in package:
            packages_to_rm = []
            for pkg in packages:
                if pkg.startswith(package + "/"):
                    packages_to_rm.append(pkg)
                    used = True
            for pkg in packages_to_rm:
                del packages[pkg]
        else:
            if package in packages:
                used = True
                del packages[package]
        if not used:
            print(f"Package '{package}' not used.")
            sys.exit(1)
    data = " ".join([f"{p}@{v}" for p, v in packages.items()])
    data = data + "\n"
    with open(args.dst, "w") as dst:
        dst.write(data)