code: def install_packages(args):
      for reqs, index_urls in _installs(args.packages):
          try:
              pip_util.install(
                  reqs,
                  index_urls=index_urls,
                  upgrade=args.upgrade or args.reinstall,
                  pre_releases=args.pre,
                  no_cache=args.no_cache,
                  no_deps=args.no_deps,
                  reinstall=args.reinstall,
                  target=args.target,
              )
          except pip_util.InstallError as e:
              cli.error(str(e))
  
file_path: guildai/guild/commands/packages_impl.py
imports: import logging
  import os
  import re
  from guild import cli
  from guild import namespace
  from guild import pip_util
  from guild import util
label_desc: Use image node_id 7 for calling a global function with example usage: install_packages(args) without return types