code: def prepare_parent(next, token):
      def select(context, result):
          # FIXME: raise error if .. is applied at toplevel?
          parent_map = get_parent_map(context)
          result_map = {}
          for elem in result:
              if elem in parent_map:
                  parent = parent_map[elem]
                  if parent not in result_map:
                      result_map[parent] = None
                      yield parent
  
      return select
  
file_path: catboost/contrib/tools/python3/src/Lib/xml/etree/ElementPath.py
imports: import re
label_desc: Use image node_id 9 for calling a global function with example usage: prepare_parent(next, token) and returns: select