code: def _read_api_def_map(folder):
      api_def_map = {}
      for filename in sorted(os.listdir(folder)):
          if filename.endswith(".pbtxt"):
              api_defs = (
                  api_def_pb2.ApiDefs()
              )  # pylint: disable=no-member
              filename = folder + "/" + filename
              with open(filename, "r", encoding="utf-8") as file:
                  multiline_pbtxt = file.read()
                  pbtxt = _pbtxt_from_multiline(multiline_pbtxt)
                  google.protobuf.text_format.Merge(pbtxt, api_defs)
              for api_def in api_defs.op:
                  api_def_map[api_def.graph_op_name] = api_def
      return api_def_map
  
imports: import json
  import logging
  import os
  import google.protobuf
  from tensorflow.core.framework import api_def_pb2
  from tensorflow.core.framework import op_def_pb2
  from tensorflow.core.framework import types_pb2
label_desc: Use image node_id 7 for calling a global function with example usage: _read_api_def_map(folder) and returns: api_def_map