code: def _installs(pkgs):
      index_urls = {}
      for pkg in pkgs:
          if os.path.exists(pkg):
              index_urls.setdefault(None, []).append(pkg)
          else:
              info = _pip_info(pkg)
              urls_key = "\n".join(info.install_urls)
              index_urls.setdefault(urls_key, []).append(
                  info.project_name
              )
      return [
          (reqs, urls_key.split("\n") if urls_key else [])
          for urls_key, reqs in index_urls.items()
      ]
  
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 8 for calling a global function with example usage: _installs(pkgs) and returns: unknown