code: def test_character_ngrams(
      n, expected_values, expected_index, as_list
  ):
      strings = cudf.Series(
          ["this", "is", "my", "book", "here", ""],
          index=[1, 2, 3, 4, 5, 6],
      )
  
      expected = cudf.Series(expected_values, index=expected_index)
  
      actual = strings.str.character_ngrams(n=n, as_list=as_list)
  
      assert type(expected) == type(actual)
      assert_eq(expected, actual)
  
imports: import random
  import string
  import numpy
  import pytest
  import cudf
  from cudf.core.byte_pair_encoding import BytePairEncoder
  from cudf.core.tokenize_vocabulary import TokenizeVocabulary
  from cudf.testing._utils import assert_eq
label_desc: Use image node_id 9 for calling a global function with example usage: test_character_ngrams(n, expected_values, expected_index, as_list) without return types