code: def test_text_subword_tokenize(tmpdir):
      sr = cudf.Series(
          [
              "This is a test",
              "A test this is",
              "Is test a this",
              "Test   test",
              "this   This",
          ]
      )
      hash_file = tmpdir.mkdir("nvtext").join("tmp_hashed_vocab.txt")
      content = "1\n0\n23\n"
      coefficients = [65559] * 23
      for c in coefficients:
          content = content + str(c) + " 0\n"
      # based on values from the bert_hash_table.txt file for the
      # test words used here: 'this' 'is' 'a' test'
      table = [0] * 23
      table[0] = 3015668
      table[1] = 6205475701751155871
      table[5] = 6358029
      table[16] = 451412625363
      table[20] = 6206321707968235495
      content = content + "23\n"
      for v in table:
          content = content + str(v) + "\n"
      content = content + "100\n101\n102\n\n"
      hash_file.write(content)
  
      cudf_tokenizer = SubwordTokenizer(hash_file)
  
      token_d = cudf_tokenizer(
          sr, 8, 8, add_special_tokens=False, truncation=True
      )
      tokens, masks, metadata = (
          token_d["input_ids"],
          token_d["attention_mask"],
          token_d["metadata"],
      )
      expected_tokens = cupy.asarray(
          [
              2023,
              2003,
              1037,
              3231,
              0,
              0,
              0,
              0,
              1037,
              3231,
              2023,
              2003,
              0,
              0,
              0,
              0,
              2003,
              3231,
              1037,
              2023,
              0,
              0,
              0,
              0,
              3231,
              3231,
              0,
              0,
              0,
              0,
              0,
              0,
              2023,
              2023,
              0,
              0,
              0,
              0,
              0,
              0,
          ],
          dtype=np.uint32,
      )
      expected_tokens = expected_tokens.reshape(-1, 8)
      assert_eq(expected_tokens, tokens)
  
      expected_masks = cupy.asarray(
          [
              1,
              1,
              1,
              1,
              0,
              0,
              0,
              0,
              1,
              1,
              1,
              1,
              0,
              0,
              0,
              0,
              1,
              1,
              1,
              1,
              0,
              0,
              0,
              0,
              1,
              1,
              0,
              0,
              0,
              0,
              0,
              0,
              1,
              1,
              0,
              0,
              0,
              0,
              0,
              0,
          ],
          dtype=np.uint32,
      )
      expected_masks = expected_masks.reshape(-1, 8)
      assert_eq(expected_masks, masks)
  
      expected_metadata = cupy.asarray(
          [0, 0, 3, 1, 0, 3, 2, 0, 3, 3, 0, 1, 4, 0, 1], dtype=np.uint32
      )
      expected_metadata = expected_metadata.reshape(-1, 3)
      assert_eq(expected_metadata, metadata)
  
file_path: cudf/python/cudf/cudf/tests/text/test_subword_tokenizer.py
imports: import os
  import cupy
  import numpy
  import pytest
  import cudf
  from cudf.core.subword_tokenizer import SubwordTokenizer
  from cudf.testing._utils import assert_eq
label_desc: Use image node_id 5 for calling a global function with example usage: test_text_subword_tokenize(tmpdir) without return types