code: def _get_sparse_output_annotations(
      graph: tf.compat.v1.Graph,
  ) -> List[Tuple[tf.Tensor, List[Union[str, tf.Tensor]]]]:
      """Provides sparse output user annotations."""
      sparse_output_annotations = _extract_sparse_output_annotations(
          graph
      )
      annotated_refs = set(
          t[0].ref() for t in sparse_output_annotations
      )
      # Can't put None in collection, so putting an empty string.
      return list(
          itertools.chain(
              (
                  (a, tf.constant([""]))
                  for a in _extract_true_sparse_annotations(graph)
                  if a.ref() not in annotated_refs
              ),
              sparse_output_annotations,
          )
      )
  
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 23 for calling a global function with example usage: _get_sparse_output_annotations(graph) and returns: list