code: def test_json_nested_lines(data, lines):
      bytes = BytesIO()
      pdf = pd.DataFrame(data)
      pdf.to_json(bytes, orient="records", lines=lines)
      bytes.seek(0)
      df = cudf.read_json(
          bytes, engine="cudf", orient="records", lines=lines
      )
      bytes.seek(0)
      pdf = pd.read_json(bytes, orient="records", lines=lines)
      # In the second test-case we need to take a detour via pyarrow
      # Pandas omits "f1" in first row, so we have to enforce a common schema,
      # such that pandas would have the f1 member with null
      # Also, pyarrow chooses to select different ordering of a nested column
      # children though key-value pairs are correct.
      pa_table_pdf = pa.Table.from_pandas(
          pdf, schema=df.to_arrow().schema, safe=False
      )
      assert df.to_arrow().equals(pa_table_pdf)
  
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 32 for calling a global function with example usage: test_json_nested_lines(data, lines) without return types