code: def test_dataset_to_json_orient(
      self, orient, container, keys, len_at, dataset
  ):
      with io.BytesIO() as buffer:
          JsonDatasetWriter(
              dataset, buffer, lines=False, orient=orient
          ).write()
          buffer.seek(0)
          exported_content = load_json(buffer)
      assert isinstance(exported_content, container)
      if keys:
          if container is dict:
              assert exported_content.keys() == keys
          else:
              assert exported_content[0].keys() == keys
      else:
          assert not hasattr(exported_content, "keys") and not hasattr(
              exported_content[0], "keys"
          )
      if len_at:
          assert len(exported_content[len_at]) == 10
      else:
          assert len(exported_content) == 10
  
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 the TestJsonDatasetWriter obj's underlying member method code with example usage: obj.test_dataset_to_json_orient(orient, container, keys, len_at, dataset) without return types