docstr: Tests generator calculation with an int domain and a vocab.
docstr_tok: ["Tests","generator","calculation","with","an","int","domain","and","a","vocab","."]
code: def test_nl_generator_int_feature_vocab(self):
      """Tests generator calculation with an int domain and a vocab."""
      with tempfile.NamedTemporaryFile() as vocab_file:
          vocab_file.write(b"Foo\nBar\nBaz\nBazz\n")
          vocab_file.flush()
          input_batches = [
              pa.array([[0, 1, 2, 3, 4]]),
              pa.array([[0, 1, 2, 3, 4]]),
          ]
          generator = nlsg.NLStatsGenerator(
              self._schema, {"my_vocab": vocab_file.name}, 0, 0, 0
          )
          expected_reported_sequences = [
              ["Foo", "Bar", "Baz", "Bazz", 4]
          ] * 2
          self.assertCombinerOutputEqual(
              input_batches,
              generator,
              self._create_expected_feature_name_statistics(
                  feature_coverage=float(1) / 3,
                  avg_token_length=4,
                  min_sequence_length=5,
                  max_sequence_length=5,
                  reported_sequences=expected_reported_sequences,
              ),
              self._int_nlp_feature_with_vocab_path,
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tempfile
  from absl.testing import absltest
  import pyarrow
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import natural_language_stats_generator
  from tensorflow_data_validation.utils import test_util
  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 11 for calling the NaturalLanguageStatsGeneratorTest obj's underlying member method code with example usage: obj.test_nl_generator_int_feature_vocab() without return types