code: def attach_bytes(key, the_bytes):
    
    tf_v1.add_to_collection(
        _ATTACHMENT_COLLECTION_INTERNAL,
        module_attachment_pb2.ModuleAttachment(key=key, value=the_bytes))
docs: Adds a ModuleAttachment to the current graph.
  
    Args:
      key: A string with the unique key of the attachment.
      the_bytes: A bytes object with the serialized attachment.