code: def test_comp_decomp(path):
      """Compress and decompress a random binary file with integer data type, and check the files
      are byte to byte equal. This would not work for floating-point data types.
      """
      arr = np.array(
          np.random.randint(low=0, high=255, size=(1000, 1000)),
          dtype=np.int16,
      ).T
      _write_arr(path, arr)
      out = path.parent / "data.cbin"
      outmeta = path.parent / "data.ch"
      compress(
          path,
          out,
          outmeta,
          sample_rate=sample_rate,
          n_channels=arr.shape[1],
          dtype=arr.dtype,
      )
      decompressed_path = path.with_suffix(".decomp.bin")
      decompress(out, outmeta, out=decompressed_path)
  
      # Check the files are equal.
      with open(str(path), "rb") as f:
          buf1 = f.read()
          sha1_original = sha1(buf1)
      with open(str(decompressed_path), "rb") as f:
          buf2 = f.read()
          sha1_decompressed = sha1(buf2)
      assert buf1 == buf2
  
      # Check the SHA1s.
      with open(str(out), "rb") as f:
          sha1_compressed = sha1(f.read())
      with open(str(outmeta), "r") as f:
          meta = json.load(f)
  
      assert meta["sha1_compressed"] == sha1_compressed
      assert (
          meta["sha1_uncompressed"]
          == sha1_decompressed
          == sha1_original
      )
  
imports: from contextlib import redirect_stdout
  import io
  from itertools import product
  import json
  import hashlib
  import logging
  import os
  import os.path
  from pathlib import Path
  import re
  import numpy
  from pytest import fixture, raises, mark
  import mtscomp
  from mtscomp import add_default_handler, Writer, Reader, load_raw_data, diff_along_axis, cumsum_along_axis, mtscomp_parser, mtsdecomp_parser, _args_to_config, read_config, compress, decompress, mtsdesc, mtscomp, mtsdecomp, mtschop, CHECK_ATOL
label_desc: Use image node_id 25 for calling a global function with example usage: test_comp_decomp(path) without return types