code: def test_read_text(datadir):
      chess_file = str(datadir) + "/chess.pgn"
      delimiter = "1."
  
      with open(chess_file) as f:
          content = f.read().split(delimiter)
  
      # Since Python split removes the delimiter and read_text does
      # not we need to add it back to the 'content'
      expected = cudf.Series(
          [
              c + delimiter if i < (len(content) - 1) else c
              for i, c in enumerate(content)
          ]
      )
  
      actual = cudf.read_text(chess_file, delimiter=delimiter)
  
      assert_eq(expected, actual)
  
file_path: cudf/python/cudf/cudf/tests/input_output/test_text.py
imports: from io import StringIO
  import pytest
  import cudf
  from cudf.testing._utils import assert_eq
label_desc: Use image node_id 2 for calling a global function with example usage: test_read_text(datadir) without return types