code: def build_dep_graph() -> DepGraph:
      """Build index from py files to their immediate dependees."""
      graph = DepGraph()
  
      # Assuming we run from root /ray directory.
      # Follow links since rllib is linked to /rllib.
      for root, sub_dirs, files in os.walk("python", followlinks=True):
          if _should_skip(root):
              continue
  
          module = _bazel_path_to_module_path(root)
  
          # Process files first.
          for f in files:
              if not f.endswith(".py"):
                  continue
  
              full = _full_module_path(module, f)
              if full.startswith("ray.serve.tests.test_config_files."):
                  # Skip ray serve test files; can contain invalid python code.
                  continue
  
              if full not in graph.ids:
                  graph.ids[full] = len(graph.ids)
  
              # Process file:
              _process_file(graph, os.path.join(root, f), full)
  
      # Build reverse index for convenience.
      graph.inv_ids = {v: k for k, v in graph.ids.items()}
  
      return graph
  
imports: import argparse
  import ast
  import os
  import re
  import subprocess
  import sys
  from typing import Dict, List, Tuple
label_desc: Use image node_id 8 for calling a global function with example usage: build_dep_graph() and returns: graph