code: def load_op_dep_graph(fname: str) -> DepGraph:
      with open(fname) as stream:
          result = defaultdict(set)
          for op in yaml.safe_load(stream):
              op_name = canonical_name(op["name"])
              for dep in op.get("depends", []):
                  dep_name = canonical_name(dep["name"])
                  result[op_name].add(dep_name)
          return dict(result)
  
file_path: pytorch/tools/code_analyzer/gen_op_registration_allowlist.py
imports: import argparse
  from collections import defaultdict
  from typing import Dict, List, Set
  import yaml
label_desc: Use image node_id 2 for calling a global function with example usage: load_op_dep_graph(fname) and returns: dict