code: def annotate(type_url, proto_message, tensor=None):
      """Adds a deferred annotation to the schema.
  
      Experimental: This API is subject to change.
  
      This function allows analyzers or end users to annotate the post-transform
      schema with additional information based on analyzer output. These annotations
      are stored in the annotation.extra_metadata field of the tf.metadata schema:
      https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/schema.proto#L193
  
      Args:
        type_url: A string or string `Tensor` containing the type url which uniquely
          identifies the type of the serialized proto message. See
          https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto#L151
        proto_message: A deferred string tensor containing the serialized proto to
          write to the feature schema.
        tensor: (optional) If provided, the annotation will be written to the
          Feature proto that is created for this tensor in the schema. If None,
          the annotation is assumed to be global. Note: if the tensor is not present
            in the output signature of `preprocessing_fn`, this will be a no-op.
      """
      if tensor is None:
          tensor = tf.constant(
              "unused", name=_TF_METADATA_EXTRA_ANNOTATION_GLOBAL
          )
      if not isinstance(tensor, (tf.Tensor, tf.SparseTensor)):
          raise ValueError("tensor {} was not a Tensor".format(tensor))
      if not isinstance(proto_message, tf.Tensor):
          raise ValueError(
              "proto_message {} was not a Tensor".format(proto_message)
          )
  
      # If the type_url is passed as a plain string, create a string tensor.
      if not isinstance(type_url, tf.Tensor):
          type_url = tf.constant(type_url, dtype=tf.string)
      # Note: The tensors, types, and messages are stored in separate collections
      # because SavedModel only supports primitive types in collections.
      tf.compat.v1.add_to_collection(
          _TF_METADATA_EXTRA_ANNOTATION, tensor
      )
      tf.compat.v1.add_to_collection(
          _TF_METADATA_EXTRA_ANNOTATION_TYPE_URL, type_url
      )
      tf.compat.v1.add_to_collection(
          _TF_METADATA_EXTRA_ANNOTATION_PROTO, proto_message
      )
  
imports: import collections
  import itertools
  from typing import Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple, Union
  from absl import logging
  import tensorflow
  from tensorflow_transform import common
  from tensorflow_transform import common_types
  from tensorflow_transform import graph_context
  from tensorflow_transform import tf2_utils
  from tensorflow_transform import tf_utils
  from tensorflow_transform.saved import saved_transform_io_v2
  from tensorflow_transform.tf_metadata import schema_utils
  from tfx_bsl.tfxio import tensor_representation_util
  from google.protobuf import any_pb2
  from tensorflow.python.eager import function
  from tensorflow.python.framework import ops
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 12 for calling a global function with example usage: annotate(type_url, proto_message, tensor) without return types