code: def test_generate_ngrams(self):
      ngrams = text_utils.generate_ngrams(self.TOKENS, 2)
  
      self.assertEqual(
          list(ngrams),
          [
              "this will",
              "will be",
              "be a",
              "a test",
              "test of",
              "of tokens",
          ],
      )
  
      ngrams = text_utils.generate_ngrams(self.TOKENS, 3)
  
      self.assertEqual(
          list(ngrams),
          [
              "this will be",
              "will be a",
              "be a test",
              "a test of",
              "test of tokens",
          ],
      )
  
imports: import os
  import unittest
  import mmf.utils.text
  import numpy
  import torch
  from mmf.common.registry import registry
  from mmf.common.sample import Sample, SampleList
  from mmf.utils.configuration import Configuration
  from mmf.utils.env import setup_imports
  from mmf.utils.general import get_mmf_root
  from tests.test_utils import dummy_args
  from tests.utils.test_model import TestDecoderModel
label_desc: Use image node_id 3 for calling the TestUtilsText obj's underlying member method code with example usage: obj.test_generate_ngrams() without return types