class_docstr: Tests for LiftStatsGenerator.
class_docstr_tok: ["Tests","for","LiftStatsGenerator","."]
code: def test_lift_weighted_weight_is_none(self):
      examples = [
          pa.RecordBatch.from_arrays(
              [
                  pa.array([["a"]]),
                  pa.array([["cat"]]),
                  pa.array([None]),
              ],
              ["categorical_x", "string_y", "weight"],
          ),
      ]
      schema = text_format.Parse(
          """
          feature {
            name: 'categorical_x'
            type: BYTES
          }
          feature {
            name: 'string_y'
            type: BYTES
          }
          feature {
            name: 'weight'
            type: FLOAT
          }
          """,
          schema_pb2.Schema(),
      )
      generator = lift_stats_generator.LiftStatsGenerator(
          schema=schema,
          y_path=types.FeaturePath(["string_y"]),
          example_weight_map=ExampleWeightMap(weight_feature="weight"),
      )
      examples = [(None, e) for e in examples]
      with self.assertRaisesRegex(
          ValueError, r'Weight column "weight" cannot be null.*'
      ):
          with beam.Pipeline() as p:
              _ = p | beam.Create(examples) | generator.ptransform
  
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 11 for calling the LiftStatsGeneratorTest obj's underlying member method code with example usage: obj.test_lift_weighted_weight_is_none() without return types