class_docstr: Tests for LiftStatsGenerator.
class_docstr_tok: ["Tests","for","LiftStatsGenerator","."]
code: def test_lift_overlapping_top_bottom_k(self):
      examples = [
          pa.RecordBatch.from_arrays(
              [
                  pa.array([["a"], ["b"], ["c"], ["a"]]),
                  pa.array([["cat"], ["cat"], ["cat"], ["dog"]]),
              ],
              ["categorical_x", "string_y"],
          ),
      ]
      schema = text_format.Parse(
          """
          feature {
            name: 'categorical_x'
            type: BYTES
          }
          feature {
            name: 'string_y'
            type: BYTES
          }
          """,
          schema_pb2.Schema(),
      )
      expected_result = [
          text_format.Parse(
              """
              cross_features {
                path_x {
                  step: "categorical_x"
                }
                path_y {
                  step: "string_y"
                }
                categorical_cross_stats {
                  lift {
                    lift_series {
                      y_string: "cat"
                      y_count: 3
                      lift_values {
                        x_string: "b"
                        lift: 1.3333333
                        x_count: 1
                        x_and_y_count: 1
                      }
                      lift_values {
                        x_string: "c"
                        lift: 1.3333333
                        x_count: 1
                        x_and_y_count: 1
                      }
                      lift_values {
                        x_string: "a"
                        lift: 0.6666667
                        x_count: 2
                        x_and_y_count: 1
                      }
                    }
                    lift_series {
                      y_string: "dog"
                      y_count: 1
                      lift_values {
                        x_string: "a"
                        lift: 2.0
                        x_count: 2
                        x_and_y_count: 1
                      }
                      lift_values {
                        x_string: "b"
                        lift: 0.0
                        x_count: 1
                        x_and_y_count: 0
                      }
                      lift_values {
                        x_string: "c"
                        lift: 0.0
                        x_count: 1
                        x_and_y_count: 0
                      }
                    }
                  }
                }
              }""",
              statistics_pb2.DatasetFeatureStatistics(),
          ),
      ]
      generator = lift_stats_generator.LiftStatsGenerator(
          schema=schema,
          y_path=types.FeaturePath(["string_y"]),
          top_k_per_y=3,
          bottom_k_per_y=3,
      )
      self.assertSlicingAwareTransformOutputEqual(
          examples,
          generator,
          expected_result,
          add_default_slice_key_to_input=True,
          add_default_slice_key_to_output=True,
      )
  
imports: from typing import Optional, Sequence, Text
  from absl.testing import absltest
  import apache_beam
  import numpy
  import pandas
  import pyarrow
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import lift_stats_generator
  from tensorflow_data_validation.utils import test_util
  from tensorflow_data_validation.utils.example_weight_map import ExampleWeightMap
  from google.protobuf import text_format
  from tensorflow_metadata.proto.v0 import schema_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 21 for calling the LiftStatsGeneratorTest obj's underlying member method code with example usage: obj.test_lift_overlapping_top_bottom_k() without return types