code: def serialize(obj):
      """Create a SavedUserObject from a trackable object."""
      for identifier in _TYPE_IDENTIFIERS:
          predicate, versions = _REVIVED_TYPE_REGISTRY[identifier]
          if predicate(obj):
              # Always uses the most recent version to serialize.
              return versions[0].to_proto()
      return None
  
file_path: tensorflow/tensorflow/python/saved_model/revived_types.py
imports: import operator
  from tensorflow.core.framework import versions_pb2
  from tensorflow.core.protobuf import saved_object_graph_pb2
  from tensorflow.python.trackable import data_structures
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 2 for calling a global function with example usage: serialize(obj) and returns: None, versions