code: def get_transform_input_columns(
      preprocessing_fn: Callable[
          [Mapping[str, common_types.TensorType]],
          Mapping[str, common_types.TensorType],
      ],
      specs: Mapping[
          str, Union[common_types.FeatureSpecType, tf.TypeSpec]
      ],
      force_tf_compat_v1: bool = False,
  ) -> List[str]:
      """Return columns that are required inputs of `TransformDataset`.
  
      Args:
        preprocessing_fn: A tf.transform preprocessing_fn.
        specs: A dict of feature name to tf.TypeSpecs. If `force_tf_compat_v1` is
          True, this can also be feature specifications.
        force_tf_compat_v1: (Optional) If `True`, use Tensorflow in compat.v1 mode.
          Defaults to `False`.
  
      Returns:
        A list of columns that are required inputs of the transform `tf.Graph`
        defined by `preprocessing_fn`.
      """
      use_tf_compat_v1 = tf2_utils.use_tf_compat_v1(force_tf_compat_v1)
      if not use_tf_compat_v1:
          assert all(
              [isinstance(s, tf.TypeSpec) for s in specs.values()]
          ), specs
      (
          graph,
          structured_inputs,
          structured_outputs,
      ) = impl_helper.trace_preprocessing_function(
          preprocessing_fn, specs, use_tf_compat_v1=use_tf_compat_v1
      )
  
      transform_input_tensors = graph_tools.get_dependent_inputs(
          graph, structured_inputs, structured_outputs
      )
      return list(transform_input_tensors.keys())
  
file_path: transform/tensorflow_transform/inspect_preprocessing_fn.py
imports: import itertools
  from typing import Callable, List, Mapping, Union
  import tensorflow
  from tensorflow_transform import analyzer_nodes
  from tensorflow_transform import common_types
  from tensorflow_transform import graph_tools
  from tensorflow_transform import impl_helper
  from tensorflow_transform import nodes
  from tensorflow_transform import tf2_utils
label_desc: Use image node_id 2 for calling a global function with example usage: get_transform_input_columns(preprocessing_fn, specs, force_tf_compat_v1) and returns: list