code: def write_block_to_file(
      self, block: BlockAccessor, file: "pyarrow.NativeFile"
  ):
      writer_args = _resolve_kwargs(
          self.pandas_json_args_fn, **self.pandas_json_args
      )
      orient = writer_args.pop("orient", "records")
      lines = writer_args.pop("lines", True)
  
      block.to_pandas().to_json(
          file, orient=orient, lines=lines, **writer_args
      )
  
file_path: ray/python/ray/data/datasource/json_datasink.py
imports: from typing import Any, Callable, Dict, Optional
  import pyarrow
  from ray.data.block import BlockAccessor
  from ray.data.datasource.file_based_datasource import _resolve_kwargs
  from ray.data.datasource.file_datasink import BlockBasedFileDatasink
label_desc: Use image node_id 2 for calling the _JSONDatasink obj's underlying member method code with example usage: obj.write_block_to_file(block, file) without return types