code: def test_to_json_results():
      with tmpfile("json") as f:
          paths = ddf.to_json(f)
          assert paths == [
              os.path.join(f, f"{n}.part")
              for n in range(ddf.npartitions)
          ]
  
      with tmpfile("json") as f:
          list_of_delayed = ddf.to_json(f, compute=False)
          paths = dask.compute(*list_of_delayed)
          # this is a tuple rather than a list since it's the output of dask.compute
          assert paths == tuple(
              os.path.join(f, f"{n}.part")
              for n in range(ddf.npartitions)
          )
  
imports: from __future__ import annotations
  import json
  import os
  import fsspec
  import pandas
  import pytest
  from packaging.version import Version
  import dask
  import dask.dataframe
  from dask.dataframe._compat import PANDAS_GE_200
  from dask.dataframe.utils import assert_eq
  from dask.utils import tmpdir, tmpfile
label_desc: Use image node_id 17 for calling a global function with example usage: test_to_json_results() without return types