code: def get_parent_map(context):
      parent_map = context.parent_map
      if parent_map is None:
          context.parent_map = parent_map = {}
          for p in context.root.iter():
              for e in p:
                  parent_map[e] = p
      return parent_map
  
file_path: catboost/contrib/tools/python3/src/Lib/xml/etree/ElementPath.py
imports: import re
label_desc: Use image node_id 2 for calling a global function with example usage: get_parent_map(context) and returns: parent_map