docstr: Tests that generator's add_input method properly counts valid formats.
docstr_tok: ["Tests","that","generator","'s","add_input","method","properly","counts","valid","formats","."]
code: def test_time_stats_generator_valid_formats(
      self, input_batch, expected_matching_formats
  ):
      """Tests that generator's add_input method properly counts valid formats."""
      generator = time_stats_generator.TimeStatsGenerator(
          values_threshold=1
      )
      accumulator = generator.add_input(
          generator.create_accumulator(),
          types.FeaturePath([""]),
          input_batch,
      )
      self.assertDictEqual(
          expected_matching_formats, accumulator.matching_formats
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from unittest import mock
  from absl.testing import absltest
  from absl.testing import parameterized
  import pyarrow
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import time_stats_generator
  from tensorflow_data_validation.utils import test_util
  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 TimeStatsGeneratorValidFormatsTest obj's underlying member method code with example usage: obj.test_time_stats_generator_valid_formats(input_batch, expected_matching_formats) without return types