docstr: Check that this matches batch_encode_plus on the original text.
docstr_tok: ["Check","that","this","matches","batch_encode_plus","on","the","original","text","."]
code: def test_extra_kw(self):
      """Check that this matches batch_encode_plus on the original text."""
      kw = dict(max_length=6)
      sentences = [
          "This is a somewhat longer sentence that should be truncated."
      ]
      tokens = [self.tokenizer.tokenize(s) for s in sentences]
      encoded = model_utils.batch_encode_pretokenized(
          self.tokenizer, tokens, **kw
      )
      expected_encoded = self.tokenizer.batch_encode_plus(
          sentences,
          return_tensors="tf",
          add_special_tokens=True,
          padding="longest",
          truncation="longest_first",
          **kw,
      )
      for key in expected_encoded.keys():
          np.testing.assert_array_equal(
              encoded[key].numpy(), expected_encoded[key].numpy()
          )
  
file_path: lit/lit_nlp/examples/models/model_utils_test.py
imports: import os
  from absl.testing import absltest
  from lit_nlp.examples.models import model_utils
  import numpy
  import transformers
label_desc: Use image node_id 7 for calling the BatchEncodePretokenizedTest obj's underlying member method code with example usage: obj.test_extra_kw() without return types