code: def _export_module_attachments(meta_graph):
      """Exports ModuleAttachments from the current tf.Graph into `meta_graph`."""
      added_attachments = tf.compat.v1.get_collection(
          _ATTACHMENT_COLLECTION_INTERNAL
      )
      if not added_attachments:
          return  # Don't touch `meta_graph`.
      unique_attachments = (
          collections.OrderedDict(  # Avoid indeterminism.
              (attachment.key, attachment)
              for attachment in added_attachments
          )
      )
      meta_graph.collection_def[
          ATTACHMENT_COLLECTION_SAVED
      ].bytes_list.value[:] = [
          attachment.SerializeToString()
          for attachment in unique_attachments.values()
      ]
  
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 10 for calling a global function with example usage: _export_module_attachments(meta_graph) without return types