code: def test_cross_feature_stats_generator_with_crosses_specified(self):
      generator = (
          cross_feature_stats_generator.CrossFeatureStatsGenerator(
              feature_crosses=[("a", "c"), ("b", "c")], sample_rate=1.0
          )
      )
      b1 = pa.RecordBatch.from_arrays(
          [
              pa.array([[1.0], [3.0], [5.0]]),
              pa.array([[2.0], [4.0], [6.0]]),
              pa.array([[5.0], [3.0], [7.0]]),
          ],
          ["a", "b", "c"],
      )
      b2 = pa.RecordBatch.from_arrays(
          [
              pa.array([[6.0], [10.0]]),
              pa.array([[14.0], [16.0]]),
              pa.array([[-1.0], [0]]),
          ],
          ["a", "b", "c"],
      )
      batches = [b1, b2]
      expected_result = {
          ("a", "c"): text_format.Parse(
              """
              path_x { step: "a" }
              path_y { step: "c" }
              count: 5
              num_cross_stats {
                correlation: -0.59476602
                covariance: -5.4000001
              }
              """,
              statistics_pb2.CrossFeatureStatistics(),
          ),
          ("b", "c"): text_format.Parse(
              """
              path_x { step: "b" }
              path_y { step: "c" }
              count: 5
              num_cross_stats {
                correlation: -0.81070298
                covariance: -13.52
              }
              """,
              statistics_pb2.CrossFeatureStatistics(),
          ),
      }
      self.assertCombinerOutputEqual(
          batches, generator, {}, expected_result
      )
  
file_path: data-validation/tensorflow_data_validation/statistics/generators/cross_feature_stats_generator_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import absltest
  import pyarrow
  from tensorflow_data_validation.statistics.generators import cross_feature_stats_generator
  from tensorflow_data_validation.utils import test_util
  from google.protobuf import text_format
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 2 for calling the CrossFeatureStatsGeneratorTest obj's underlying member method code with example usage: obj.test_cross_feature_stats_generator_with_crosses_specified() without return types