code: def get_attached_bytes_map(meta_graph):
      """Returns the dict of ModuleAttachments stored in `meta_graph`.
  
      Args:
        meta_graph: A MetaGraphDef, as built by SavedModelHandler.add_graph_copy()
          from some graph.
  
      Returns:
        A dict, containing the `(key, bytes)` items passed to `attach_bytes()`
        when the graph had been built.
  
      Raises:
        ValueError: if `meta-graph` is malformed.
      """
      result = {}
      if ATTACHMENT_COLLECTION_SAVED not in meta_graph.collection_def:
          return result
      collection_def = meta_graph.collection_def[
          ATTACHMENT_COLLECTION_SAVED
      ]
      if collection_def.WhichOneof("kind") != "bytes_list":
          raise ValueError(
              "Internal CollectionDef for attached messages has kind %s, "
              "expected bytes_list" % collection_def.WhichOneof("kind")
          )
      attachment = module_attachment_pb2.ModuleAttachment()
      for value in collection_def.bytes_list.value:
          attachment.ParseFromString(value)
          result[
              attachment.key
          ] = attachment.value  # Immutable; needs no copy.
      return result
  
imports: import collections
  import os
  import re
  from absl import logging
  import tensorflow
  from tensorflow_hub import module_attachment_pb2
  from tensorflow_hub import tf_utils
  from google.protobuf import message
  from tensorflow.core.protobuf import meta_graph_pb2
  from tensorflow.core.protobuf import saved_model_pb2
label_desc: Use image node_id 11 for calling a global function with example usage: get_attached_bytes_map(meta_graph) and returns: result, result