code: def main(args=None):
      import argparse
  
      parser = argparse.ArgumentParser(
          prog=__name__,
          description="Creates virtual Python "
          "environments in one or "
          "more target "
          "directories.",
          epilog="Once an environment has been "
          "created, you may wish to "
          "activate it, e.g. by "
          "sourcing an activate script "
          "in its bin directory.",
      )
      parser.add_argument(
          "dirs",
          metavar="ENV_DIR",
          nargs="+",
          help="A directory to create the environment in.",
      )
      parser.add_argument(
          "--system-site-packages",
          default=False,
          action="store_true",
          dest="system_site",
          help="Give the virtual environment access to the "
          "system site-packages dir.",
      )
      if os.name == "nt":
          use_symlinks = False
      else:
          use_symlinks = True
      group = parser.add_mutually_exclusive_group()
      group.add_argument(
          "--symlinks",
          default=use_symlinks,
          action="store_true",
          dest="symlinks",
          help="Try to use symlinks rather than copies, "
          "when symlinks are not the default for "
          "the platform.",
      )
      group.add_argument(
          "--copies",
          default=not use_symlinks,
          action="store_false",
          dest="symlinks",
          help="Try to use copies rather than symlinks, "
          "even when symlinks are the default for "
          "the platform.",
      )
      parser.add_argument(
          "--clear",
          default=False,
          action="store_true",
          dest="clear",
          help="Delete the contents of the "
          "environment directory if it "
          "already exists, before "
          "environment creation.",
      )
      parser.add_argument(
          "--upgrade",
          default=False,
          action="store_true",
          dest="upgrade",
          help="Upgrade the environment "
          "directory to use this version "
          "of Python, assuming Python "
          "has been upgraded in-place.",
      )
      parser.add_argument(
          "--without-pip",
          dest="with_pip",
          default=True,
          action="store_false",
          help="Skips installing or upgrading pip in the "
          "virtual environment (pip is bootstrapped "
          "by default)",
      )
      parser.add_argument(
          "--prompt",
          help="Provides an alternative prompt prefix for "
          "this environment.",
      )
      parser.add_argument(
          "--upgrade-deps",
          default=False,
          action="store_true",
          dest="upgrade_deps",
          help=f'Upgrade core dependencies ({", ".join(CORE_VENV_DEPS)}) '
          "to the latest version in PyPI",
      )
      parser.add_argument(
          "--without-scm-ignore-files",
          dest="scm_ignore_files",
          action="store_const",
          const=frozenset(),
          default=frozenset(["git"]),
          help="Skips adding SCM ignore files to the environment "
          "directory (Git is supported by default).",
      )
      options = parser.parse_args(args)
      if options.upgrade and options.clear:
          raise ValueError(
              "you cannot supply --upgrade and --clear together."
          )
      builder = EnvBuilder(
          system_site_packages=options.system_site,
          clear=options.clear,
          symlinks=options.symlinks,
          upgrade=options.upgrade,
          with_pip=options.with_pip,
          prompt=options.prompt,
          upgrade_deps=options.upgrade_deps,
          scm_ignore_files=options.scm_ignore_files,
      )
      for d in options.dirs:
          builder.create(d)
  
imports: import logging
  import os
  import shutil
  import subprocess
  import sys
  import sysconfig
  import types
label_desc: Use image node_id 2 for calling a global function with example usage: main(args) without return types