code: def find_key(obj, path, marker_line):
      for i, key in enumerate(path):
          try:
              obj = obj[key]
          except KeyError:
              context = ".".join(repr(p) for p in path[:i])
              others = ", ".join(repr(k) for k in obj.keys())
              error(
                  f"expected key {key!r} at {context}, found {others}",
                  marker_line,
              )
  
      return obj
  
file_path: stellargraph/scripts/ci/validate_ci_workflow.py
imports: import yaml
  import sys
  import glob
  import os
  from collections import Counter
label_desc: Use image node_id 3 for calling a global function with example usage: find_key(obj, path, marker_line) and returns: obj