code: def get_analysis_dataset_keys(
      preprocessing_fn,
      specs,
      dataset_keys,
      input_cache,
      force_tf_compat_v1,
  ):
      """Computes the dataset keys that are required in order to perform analysis.
  
      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.
        dataset_keys: A set of strings which are dataset keys, they uniquely
          identify these datasets across analysis runs.
        input_cache: A cache dictionary.
        force_tf_compat_v1: If `True`, use Tensorflow in compat.v1 mode.
  
      Returns:
        A set of dataset keys that are required for analysis.
      """
      transform_fn_future, _ = _build_analysis_graph_for_inspection(
          preprocessing_fn,
          specs,
          dataset_keys,
          input_cache,
          force_tf_compat_v1,
      )
  
      result = set()
      inspect_visitor = _InspectVisitor(result)
      inspect_traverser = nodes.Traverser(inspect_visitor)
      _ = inspect_traverser.visit_value_node(transform_fn_future)
  
      # If None is present this means that a flattened version of the entire dataset
      # is required, therefore this will be returning all of the given dataset_keys.
      if any(k.is_flattened_dataset_key() for k in result):
          result = dataset_keys
      return result
  
imports: import collections
  import dataclasses
  import hashlib
  from typing import Collection, Dict, Mapping, Optional, Tuple
  from typing import OrderedDict
  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
  from tensorflow_transform import tf_utils
  from tensorflow_transform.beam import analyzer_cache
  from tensorflow_transform.beam import beam_nodes
  from tensorflow_transform.beam import combiner_packing_util
label_desc: Use image node_id 4 for calling a global function with example usage: get_analysis_dataset_keys(preprocessing_fn, specs, dataset_keys, input_cache, force_tf_compat_v1) and returns: result