code: def _index_dirs(index):
      index_dirs = {
          dirname
          for dirname in [os.path.dirname(path) for path in index]
          if dirname
      }
      return set(_expand_parents(index_dirs))
  
imports: import fnmatch
  import logging
  import re
  import os
  from guild import cli
  from guild import run_manifest
  from guild import util
  from .None import remote_impl_support
  from .None import runs_impl
label_desc: Use image node_id 18 for calling a global function with example usage: _index_dirs(index) and returns: set