code: def test_categorical_float_feature(self):
      batches = [
          pa.RecordBatch.from_arrays(
              [pa.array([[1.0, 5.0, 10.0], [0.0]])], ["c"]
          ),
          pa.RecordBatch.from_arrays(
              [pa.array([[1.0, 1.0, 1.0, 5.0, 15.0], [-1.0]])], ["c"]
          ),
          pa.RecordBatch.from_arrays(
              [pa.array([None, None], type=pa.null())], ["c"]
          ),
      ]
      expected_result = {
          types.FeaturePath(["c"]): text_format.Parse(
              """
              path {
                step: 'c'
              }
              type: FLOAT
              string_stats {
                common_stats {
                  num_non_missing: 4
                  num_missing: 2
                  min_num_values: 1
                  max_num_values: 5
                  avg_num_values: 2.5
                  num_values_histogram {
                    buckets {
                      low_value: 1.0
                      high_value: 1.0
                      sample_count: 2
                    }
                    buckets {
                      low_value: 1.0
                      high_value: 3.0
                      sample_count: 1
                    }
                    buckets {
                      low_value: 3.0
                      high_value: 5.0
                      sample_count: 1
                    }
                    type: QUANTILES
                  }
                  tot_num_values: 10
                }
                avg_length: 3.3
              }
              """,
              statistics_pb2.FeatureNameStatistics(),
          )
      }
      schema = text_format.Parse(
          """
          feature {
            name: "c"
            type: FLOAT
            float_domain {
              is_categorical: true
            }
          }
          """,
          schema_pb2.Schema(),
      )
      generator = basic_stats_generator.BasicStatsGenerator(
          schema=schema,
          num_values_histogram_buckets=3,
          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 16 for calling the BasicStatsGeneratorTest obj's underlying member method code with example usage: obj.test_categorical_float_feature() without return types