code: def _get_schema_annotations_v2(metadata):
      """Fetch extra_metadata annotations to be applied to the schema.
  
      Extracts any deferred annotations that have been added to the graph and
      evaluates them to obtain any_pb2.Any proto messages.
  
      Args:
        metadata: A dictionary containing the deferred annotations added to the
          graph.
  
      Returns:
        tensor_annotations: dictionary from tensor to list of any_pb2.Any protos to
          be added as an annotation for that tensor's feature in the schema.
        global_annotations: list of any_pb2.Any protos to be added at the global
          schema level.
      """
      type_urls = [
          type_url.numpy()
          for type_url in metadata[
              _TF_METADATA_EXTRA_ANNOTATION_TYPE_URL
          ]
      ]
      proto_values = [
          proto_value.numpy()
          for proto_value in metadata[
              _TF_METADATA_EXTRA_ANNOTATION_PROTO
          ]
      ]
      tensor_annotation_keys = [
          tensor.numpy().decode()
          for tensor in metadata[_TF_METADATA_EXTRA_ANNOTATION]
      ]
      return _get_schema_annotations_common(
          tensor_annotation_keys, type_urls, proto_values
      )
  
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 14 for calling a global function with example usage: _get_schema_annotations_v2(metadata) and returns: _get_schema_annotations_common