code: def test_to_json_compression_mode(compression):
      # GH 39985 (read_json does not support user-provided binary files)
      expected = pd.DataFrame({"A": [1]})
  
      with BytesIO() as buffer:
          expected.to_json(buffer, compression=compression)
  
file_path: pandas/pandas/tests/io/json/test_compression.py
imports: from io import BytesIO, StringIO
  import pytest
  import pandas.util._test_decorators
  import pandas
  import pandas._testing
label_desc: Use image node_id 9 for calling a global function with example usage: test_to_json_compression_mode(compression) without return types