code: def test_with_bytes_features(self):
      b1 = pa.RecordBatch.from_arrays(
          [
              pa.array([[b"x", b"y", b"z", b"w"], [b"qwe", b"abc"]]),
          ],
          ["b"],
      )
      b2 = pa.RecordBatch.from_arrays(
          [
              pa.array([[b"ab"]]),
          ],
          ["b"],
      )
      batches = [b1, b2]
      schema = text_format.Parse(
          """
          feature {
            name: "b"
            type: BYTES
            image_domain { }
          }
          """,
          schema_pb2.Schema(),
      )
      expected_result = {
          types.FeaturePath(["b"]): text_format.Parse(
              """
              path {
                step: 'b'
              }
              type: BYTES
              bytes_stats {
                common_stats {
                  num_non_missing: 3
                  min_num_values: 1
                  max_num_values: 4
                  avg_num_values: 2.33333333
                  tot_num_values: 7
                  num_values_histogram {
                    buckets {
                      low_value: 1.0
                      high_value: 2.0
                      sample_count: 2.0
                    }
                    buckets {
                      low_value: 2.0
                      high_value: 4.0
                      sample_count: 0.5
                    }
                    buckets {
                      low_value: 4.0
                      high_value: 4.0
                      sample_count: 0.5
                    }
                    type: QUANTILES
                  }
                }
                avg_num_bytes: 1.71428571
                min_num_bytes: 1
                max_num_bytes: 3
                max_num_bytes_int: 3
              }
              """,
              statistics_pb2.FeatureNameStatistics(),
          ),
      }
      generator = basic_stats_generator.BasicStatsGenerator(
          schema=schema,
          num_values_histogram_buckets=3,
          num_histogram_buckets=3,
          num_quantiles_histogram_buckets=4,
          epsilon=0.001,
      )
      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 14 for calling the BasicStatsGeneratorTest obj's underlying member method code with example usage: obj.test_with_bytes_features() without return types