code: def test_tensor_ipc_read_from_compressed(tempdir):
      # ARROW-5910
      data = np.random.randn(10, 4)
      tensor = pa.Tensor.from_numpy(data)
  
      path = tempdir / "tensor-compressed-file"
  
      out_stream = pa.output_stream(path, compression="gzip")
      pa.ipc.write_tensor(tensor, out_stream)
      out_stream.close()
  
      result = pa.ipc.read_tensor(
          pa.input_stream(path, compression="gzip")
      )
      assert result.equals(tensor)
  
file_path: arrow/python/pyarrow/tests/test_tensor.py
imports: import os
  import sys
  import pytest
  import warnings
  import weakref
  import numpy
  import pyarrow
label_desc: Use image node_id 5 for calling a global function with example usage: test_tensor_ipc_read_from_compressed(tempdir) without return types