code: def test_can_binarize_line(self):
      data = make_data(length=1)
      vocab = build_vocab(data)
  
      binarizer = VocabularyDatasetBinarizer(
          vocab,
      )
  
      sentence = data[0]
      summary = BinarizeSummary()
  
      tensor = binarizer.binarize_line(
          " ".join(sentence),
          summary,
      )
  
      self.assertEqual(len(tensor), len(sentence) + 1)
  
      self.assertEqual(summary.num_tok, len(sentence) + 1)
      self.assertEqual(summary.num_seq, 1)
  
file_path: fairseq/tests/test_binarizer.py
imports: import os
  import typing
  import unittest
  from tempfile import TemporaryDirectory
  from fairseq.binarizer import BinarizeSummary, FileBinarizer, VocabularyDatasetBinarizer
  from fairseq.data import Dictionary, indexed_dataset
  from tests.utils import make_data, sizes
label_desc: Use image node_id 2 for calling the TestBinarizer obj's underlying member method code with example usage: obj.test_can_binarize_line() without return types