code: def test_dataset_from_json_keep_in_memory(
      keep_in_memory, jsonl_path, tmp_path
  ):
      cache_dir = tmp_path / "cache"
      expected_features = {
          "col_1": "string",
          "col_2": "int64",
          "col_3": "float64",
      }
      with assert_arrow_memory_increases() if keep_in_memory else assert_arrow_memory_doesnt_increase():
          dataset = JsonDatasetReader(
              jsonl_path,
              cache_dir=cache_dir,
              keep_in_memory=keep_in_memory,
          ).read()
      _check_json_dataset(dataset, expected_features)
  
imports: import io
  import json
  import fsspec
  import pytest
  from datasets import Dataset, DatasetDict, Features, NamedSplit, Value
  from datasets.io.json import JsonDatasetReader, JsonDatasetWriter
  from ..utils import assert_arrow_memory_doesnt_increase, assert_arrow_memory_increases
label_desc: Use image node_id 2 for calling a global function with example usage: test_dataset_from_json_keep_in_memory(keep_in_memory, jsonl_path, tmp_path) without return types