code: def test_subword_tokenize(
      seq_len, stride, add_special_tokens, do_lower_case, datadir
  ):
      with open(
          os.path.join(datadir, "test_sentences.txt"), encoding="utf-8"
      ) as file:
          input_sentence_ls = [line.strip() for line in file]
  
      vocab_dir = os.path.join(datadir, "bert_base_cased_sampled")
  
      transformers = pytest.importorskip("transformers")
  
      hf_tokenizer = transformers.BertTokenizer.from_pretrained(
          vocab_dir, do_lower_case=do_lower_case
      )
  
      hf_output = hf_tokenizer(
          input_sentence_ls,
          max_length=seq_len,
          stride=stride,
          padding="max_length",
          return_tensors="np",
          truncation=True,
          add_special_tokens=add_special_tokens,
      )
  
      vocab_hash = os.path.join(vocab_dir, "vocab-hash.txt")
      str_series = cudf.Series(input_sentence_ls)
      cudf_tokenizer = SubwordTokenizer(
          vocab_hash, do_lower_case=do_lower_case
      )
      cudf_output = cudf_tokenizer(
          str_series,
          max_length=seq_len,
          max_num_rows=len(str_series),
          stride=stride,
          padding="max_length",
          return_tensors="cp",
          truncation=True,
          add_special_tokens=add_special_tokens,
      )
      assert_equal_tokenization_outputs(hf_output, cudf_output)
  
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 3 for calling a global function with example usage: test_subword_tokenize(seq_len, stride, add_special_tokens, do_lower_case, datadir) without return types