code: def test_cudf_json_writer(pdf, lines):
      # removing datetime column because pandas doesn't support it
      for col_name in pdf.columns:
          if "datetime" in col_name:
              pdf.drop(col_name, axis=1, inplace=True)
      gdf = cudf.DataFrame.from_pandas(pdf)
      pdf_string = pdf.to_json(orient="records", lines=lines)
      gdf_string = gdf.to_json(
          orient="records", lines=lines, engine="cudf"
      )
  
      assert_eq(pdf_string, gdf_string)
  
      gdf_string = gdf.to_json(
          orient="records", lines=lines, engine="cudf", rows_per_chunk=8
      )
  
      assert_eq(pdf_string, gdf_string)
  
imports: import copy
  import gzip
  import itertools
  import os
  from io import BytesIO, StringIO
  from pathlib import Path
  import numpy
  import pandas
  import pyarrow
  import pytest
  import cudf
  from cudf.testing._utils import DATETIME_TYPES, NUMERIC_TYPES, TIMEDELTA_TYPES, assert_eq
label_desc: Use image node_id 8 for calling a global function with example usage: test_cudf_json_writer(pdf, lines) without return types