code: def test_file_writer_json():
      datastore = get_ready_ds()
      FileWriter("my_data", apply_func=to_json).transform(datastore)
      assert datastore["my_data"] == to_json(DATA)
  
file_path: popmon/tests/popmon/io/test_file_writer.py
imports: import copy
  import json
  import pandas
  import pytest
  from popmon.io import FileWriter
label_desc: Use image node_id 4 for calling a global function with example usage: test_file_writer_json() without return types