code: def test_get_analysis_dataset_keys(
      self,
      preprocessing_fn,
      full_dataset_keys,
      cached_dataset_keys,
      expected_dataset_keys,
      use_tf_compat_v1,
  ):
      if not use_tf_compat_v1:
          tft_unit.skip_if_not_tf2("Tensorflow 2.x required")
      full_dataset_keys = list(
          map(analyzer_cache.DatasetKey, full_dataset_keys)
      )
      cached_dataset_keys = map(
          analyzer_cache.DatasetKey, cached_dataset_keys
      )
      expected_dataset_keys = map(
          analyzer_cache.DatasetKey, expected_dataset_keys
      )
      # We force all dataset keys with entries in the cache dict will have a cache
      # hit.
      mocked_cache_entry_key = b"M"
      input_cache = {
          key: analyzer_cache.DatasetCache(
              {mocked_cache_entry_key: "C"}, None
          )
          for key in cached_dataset_keys
      }
      feature_spec = {"x": tf.io.FixedLenFeature([], tf.float32)}
      specs = (
          feature_spec
          if use_tf_compat_v1
          else impl_helper.get_type_specs_from_feature_specs(
              feature_spec
          )
      )
      with mock.patch(
          "tensorflow_transform.beam.analysis_graph_builder."
          "analyzer_cache.make_cache_entry_key",
          return_value=mocked_cache_entry_key,
      ):
          dataset_keys = (
              analysis_graph_builder.get_analysis_dataset_keys(
                  preprocessing_fn,
                  specs,
                  full_dataset_keys,
                  input_cache,
                  force_tf_compat_v1=use_tf_compat_v1,
              )
          )
      self.DebugPublishLatestsRenderedTFTGraph()
      self.assertCountEqual(expected_dataset_keys, dataset_keys)
  
imports: import os
  import tensorflow
  import tensorflow_transform
  from tensorflow_transform import analyzer_nodes
  from tensorflow_transform import impl_helper
  from tensorflow_transform import nodes
  from tensorflow_transform import tf2_utils
  from tensorflow_transform.beam import analysis_graph_builder
  from tensorflow_transform.beam import analyzer_cache
  from tensorflow_transform.beam import tft_unit
  from tfx_bsl.types import tfx_namedtuple
label_desc: Use image node_id 2 for calling the AnalysisGraphBuilderTest obj's underlying member method code with example usage: obj.test_get_analysis_dataset_keys(preprocessing_fn, full_dataset_keys, cached_dataset_keys, expected_dataset_keys, use_tf_compat_v1) without return types