code: def _init_manifest_index(run):
      """Returns a dict keyed by run path containing _ManifestEntry items."""
      try:
          manifest = run_manifest.manifest_for_run(run.dir)
      except FileNotFoundError as e:
          raise MergeError(
              f"run manifest does not exist for run {run.id}"
          ) from e
      else:
          index = {}
          for manifest_entry in manifest:
              index_entry = _manifest_index_entry(manifest_entry, run)
              if not index_entry:
                  continue
              index[index_entry.run_path] = index_entry
          return index
  
imports: from collections import namedtuple
  import errno
  import fnmatch
  import logging
  import os
  import shutil
  from guild import file_util
  from guild import run_manifest
label_desc: Use image node_id 2 for calling a global function with example usage: _init_manifest_index(run) and returns: index