code: def _retrieve_source_keys(
      sourced_tensors: Iterable[tf.Tensor],
      structured_inputs: Mapping[str, common_types.TensorType],
  ) -> Set[str]:
      """Retrieve input keys that sourced_tensors depend on."""
      result = set()
      sinks = [t.op for t in sourced_tensors]
      sources = retrieve_sources(
          sinks, ignore_control_dependencies=True
      )
      hashable_sources = [
          tf_utils.hashable_tensor_or_op(s) for s in sources
      ]
      for key, value in structured_inputs.items():
          components = [
              tf_utils.hashable_tensor_or_op(v)
              for v in _decompose_tensor_or_op(value)
          ]
          if any([s in components for s in hashable_sources]):
              result.add(key)
      return result
  
imports: import collections
  import copy
  import hashlib
  import itertools
  from typing import Iterable, List, Mapping, Optional, Set, Union
  import uuid
  from absl import logging
  import tensorflow
  from tensorflow_transform import analyzer_nodes
  from tensorflow_transform import common_types
  from tensorflow_transform import nodes
  from tensorflow_transform import tf_utils
  from tfx_bsl.types import tfx_namedtuple
  from tensorflow.python.framework import composite_tensor
  from tensorflow.python.framework import func_graph
  from tensorflow.python.framework import function_def_to_graph
  from tensorflow.python.util import object_identity
label_desc: Use image node_id 9 for calling a global function with example usage: _retrieve_source_keys(sourced_tensors, structured_inputs) and returns: result