code: def test_read_json_inferred_compression():
      with tmpdir() as path:
          fn = os.path.join(path, "*.json.gz")
          dd.to_json(ddf, fn, compression="gzip")
          actual = dd.read_json(fn)
          assert_eq(df, actual, check_index=False)
  
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 16 for calling a global function with example usage: test_read_json_inferred_compression() without return types