code: def test_struct(
      self,
      struct_column_as_list_dicts,
      expected_result_text_protos,
      struct_column_schema=None,
  ):
      mid = len(struct_column_as_list_dicts) // 2
  
      # Also test merging multiple batches.
      batches = [
          pa.RecordBatch.from_arrays(
              [pa.array(struct_column_as_list_dicts[:mid])], ["c"]
          ),
          pa.RecordBatch.from_arrays(
              [pa.array(struct_column_as_list_dicts[mid:])], ["c"]
          ),
      ]
  
      expected_result = {}
      for k, v in expected_result_text_protos.items():
          feature_stats = text_format.Parse(
              v, statistics_pb2.FeatureNameStatistics()
          )
          feature_path = types.FeaturePath(k)
          feature_stats.path.CopyFrom(feature_path.to_proto())
          expected_result[types.FeaturePath(k)] = feature_stats
  
      schema = None
      if struct_column_schema is not None:
          schema = text_format.Parse(
              """
          feature {
            name: "c"
            type: STRUCT
            struct_domain {
            }
          }""",
              schema_pb2.Schema(),
          )
          schema.feature[0].struct_domain.feature.add().CopyFrom(
              text_format.Parse(
                  struct_column_schema, schema_pb2.Feature()
              )
          )
      generator = basic_stats_generator.BasicStatsGenerator(
          schema=schema,
          num_values_histogram_buckets=2,
          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 1 for calling the BasicStatsGeneratorStructStatsTest obj's underlying member method code with example usage: obj.test_struct(struct_column_as_list_dicts, expected_result_text_protos, struct_column_schema) without return types