code: def main(argv):
      del argv
  
      versions = {
          pkg_version[: pkg_version.rindex("-")]: pkg_version[
              pkg_version.rindex("-") + 1 :
          ]
          for pkg_version in FLAGS.versions.replace("\n", " ").split(
              " "
          )
          if "-" in pkg_version
      }
      if FLAGS.verbose:
          print("parsed versions:", sorted(versions.items()))
      ignore = set(FLAGS.ignore)
  
      examples_root = (
          pathlib.Path(__file__).absolute().parents[1] / "examples"
      )
  
      for example_dir in examples_root.glob("*"):
          if not example_dir.is_dir():
              continue
          requirements = example_dir / "requirements.txt"
          if not requirements.exists():
              print(f'Skipping directory "{example_dir}"')
              continue
  
          pkgs = set()
          local_pkgs_and_modules = set()
          for path in example_dir.glob("*"):
              if path.is_dir() and any(path.glob("*.py")):
                  local_pkgs_and_modules.add(
                      path.parts[-1]
                  )  # local package
          for py in example_dir.glob("*.py"):
              local_pkgs_and_modules.add(
                  py.parts[-1][:-3]
              )  # local module
              for line in open(py):
                  m = import_re.match(line)
                  if m:
                      pkgs.add(m.group(1))
  
          pkgs -= local_pkgs_and_modules | standard_libs
  
          print(f"{requirements} -", end=" ")
          with requirements.open("w") as f:
              for pkg in sorted(pkgs, key=str.casefold):
                  if pkg in ignore:
                      continue
                  pkg = pkg_map.get(pkg, pkg)
                  print(f"{pkg}-{versions[pkg]}", end=" ")
                  f.write(f"{pkg}=={versions[pkg]}\n")
              print()
  
label_desc: Use image node_id 1 for calling a global function with example usage: main(argv) without return types