code: def test_handle_null_column(self):
      # Feature 'a' covers null coming before non-null.
      # Feature 'b' covers null coming after non-null.
      b1 = pa.RecordBatch.from_arrays(
          [
              pa.array([None, None, None], type=pa.null()),
              pa.array([[1.0, 2.0, 3.0], [4.0], [5.0]]),
          ],
          ["a", "b"],
      )
      b2 = pa.RecordBatch.from_arrays(
          [
              pa.array([[1, 2], None], type=pa.list_(pa.int64())),
              pa.array([None, None], type=pa.null()),
          ],
          ["a", "b"],
      )
      batches = [b1, b2]
      expected_result = {
          types.FeaturePath(["a"]): text_format.Parse(
              """
              path {
                step: "a"
              }
              num_stats {
                common_stats {
                  num_non_missing: 1
                  num_missing: 4
                  min_num_values: 2
                  max_num_values: 2
                  avg_num_values: 2.0
                  num_values_histogram {
                    buckets {
                      low_value: 2.0
                      high_value: 2.0
                      sample_count: 0.25
                    }
                    buckets {
                      low_value: 2.0
                      high_value: 2.0
                      sample_count: 0.25
                    }
                    buckets {
                      low_value: 2.0
                      high_value: 2.0
                      sample_count: 0.25
                    }
                    buckets {
                      low_value: 2.0
                      high_value: 2.0
                      sample_count: 0.25
                    }
                    type: QUANTILES
                  }
                  tot_num_values: 2
                }
                mean: 1.5
                std_dev: 0.5
                min: 1.0
                median: 2.0
                max: 2.0
                histograms {
                  buckets {
                    low_value: 1.0
                    high_value: 1.3333333
                    sample_count: 1.0016584
                  }
                  buckets {
                    low_value: 1.3333333
                    high_value: 1.6666667
                    sample_count: 0.0016584
                  }
                  buckets {
                    low_value: 1.6666667
                    high_value: 2.0
                    sample_count: 0.9966833
                  }
                }
                histograms {
                  buckets {
                    low_value: 1.0
                    high_value: 1.0
                    sample_count: 1.0
                  }
                  buckets {
                    low_value: 1.0
                    high_value: 2.0
                    sample_count: 0.3333333
                  }
                  buckets {
                    low_value: 2.0
                    high_value: 2.0
                    sample_count: 0.3333333
                  }
                  buckets {
                    low_value: 2.0
                    high_value: 2.0
                    sample_count: 0.3333333
                  }
                  type: QUANTILES
                }
              }
              """,
              statistics_pb2.FeatureNameStatistics(),
          ),
          types.FeaturePath(["b"]): text_format.Parse(
              """
              path {
                step: 'b'
              }
              type: FLOAT
              num_stats {
                common_stats {
                  num_non_missing: 3
                  num_missing: 2
                  min_num_values: 1
                  max_num_values: 3
                  avg_num_values: 1.66666698456
                  num_values_histogram {
                    buckets {
                      low_value: 1.0
                      high_value: 1.0
                      sample_count: 1.0
                    }
                    buckets {
                      low_value: 1.0
                      high_value: 1.0
                      sample_count: 1.0
                    }
                    buckets {
                      low_value: 1.0
                      high_value: 3.0
                      sample_count: 0.5
                    }
                    buckets {
                      low_value: 3.0
                      high_value: 3.0
                      sample_count: 0.5
                    }
                    type: QUANTILES
                  }
                  tot_num_values: 5
                }
                mean: 3.0
                std_dev: 1.4142136
                min: 1.0
                median: 3.0
                max: 5.0
                histograms {
                  buckets {
                    low_value: 1.0
                    high_value: 2.3333333
                    sample_count: 2.0041667
                  }
                  buckets {
                    low_value: 2.3333333
                    high_value: 3.6666667
                    sample_count: 1.0041667
                  }
                  buckets {
                    low_value: 3.6666667
                    high_value: 5.0
                    sample_count: 1.9916667
                  }
                }
                histograms {
                  buckets {
                    low_value: 1.0
                    high_value: 2.0
                    sample_count: 2.0
                  }
                  buckets {
                    low_value: 2.0
                    high_value: 3.0
                    sample_count: 1.0
                  }
                  buckets {
                    low_value: 3.0
                    high_value: 4.0
                    sample_count: 1.0
                  }
                  buckets {
                    low_value: 4.0
                    high_value: 5.0
                    sample_count: 1.0
                  }
                  type: QUANTILES
                }
              }
              """,
              statistics_pb2.FeatureNameStatistics(),
          ),
      }
      generator = basic_stats_generator.BasicStatsGenerator(
          num_values_histogram_buckets=4,
          num_histogram_buckets=3,
          num_quantiles_histogram_buckets=4,
      )
      self.assertCombinerOutputEqual(
          batches, generator, expected_result
      )
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  import pyarrow
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import basic_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 7 for calling the BasicStatsGeneratorTest obj's underlying member method code with example usage: obj.test_handle_null_column() without return types