code: def test_compression_size(obj, method, compression_only):
      if compression_only == "tar":
          compression_only = {"method": "tar", "mode": "w:gz"}
  
      with tm.ensure_clean() as path:
          getattr(obj, method)(path, compression=compression_only)
          compressed_size = os.path.getsize(path)
          getattr(obj, method)(path, compression=None)
          uncompressed_size = os.path.getsize(path)
          assert uncompressed_size > compressed_size
  
imports: import gzip
  import io
  import os
  from pathlib import Path
  import subprocess
  import sys
  import tarfile
  import textwrap
  import time
  import zipfile
  import numpy
  import pytest
  from pandas.compat import is_platform_windows
  import pandas
  import pandas._testing
  import pandas.io.common
label_desc: Use image node_id 1 for calling a global function with example usage: test_compression_size(obj, method, compression_only) without return types