code: def get_response_raw_tgz(checkpoint_path: Path) -> bytes:
      buf = io.BytesIO()
      with tarfile.open(fileobj=buf, mode="w|gz") as tf:
          for k in mock_content:
              tf.add(checkpoint_path / k, arcname=k)
  
      return buf.getbuffer()
  
file_path: determined/harness/tests/checkpoints/test_checkpoint.py
imports: import io
  import tarfile
  from pathlib import Path
  import responses
  from responses import matchers
  from determined.common import api
  from determined.common.experimental import Checkpoint
label_desc: Use image node_id 4 for calling a global function with example usage: get_response_raw_tgz(checkpoint_path) and returns: buf