code: def test_schema_claims_categorical_int_but_type_missing(self):
      # Categorical generators will run for a declared numeric with actual string
      # type, but output will be correctly string typed.
      schema = text_format.Parse(
          """
          feature {
            name: "a"
            type: INT
            int_domain { is_categorical: true }
          }""",
          schema_pb2.Schema(),
      )
      batches = [pa.RecordBatch.from_arrays([pa.array([[]])], ["a"])]
      expected_result = {
          types.FeaturePath(["a"]): text_format.Parse(
              """
                  type: STRING
                  string_stats {
                    common_stats {
                      num_non_missing: 1
                      num_missing: 0
                      num_values_histogram {
                        buckets {
                          sample_count: 0.5
                        }
                        buckets {
                          sample_count: 0.5
                        }
                        type: QUANTILES
                      }
                      presence_and_valency_stats {
                        num_non_missing: 1
                      }
                      presence_and_valency_stats {}
                    }
                  }
                  path {
                    step: "a"
                  }
                  """,
              statistics_pb2.FeatureNameStatistics(),
          )
      }
      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 22 for calling the BasicStatsGeneratorTest obj's underlying member method code with example usage: obj.test_schema_claims_categorical_int_but_type_missing() without return types