code: def test_compress():
      carr = cupy.random.default_rng().integers(0, 3, size=(10, 10))
  
      darr = da.from_array(carr, chunks=(20, 5))
  
      c = cupy.asarray([True])
      res = da.compress(c, darr, axis=0)
  
      # cupy.compress is not implemented but dask implementation does not
      # rely on np.compress -- move originial data back to host and
      # compare da.compress with np.compress
      assert_eq(
          np.compress(c.tolist(), carr.tolist(), axis=0),
          res,
          check_type=False,
      )
  
file_path: dask/dask/array/tests/test_cupy_routines.py
imports: from __future__ import annotations
  import numpy
  import pytest
  from packaging.version import parse
  import dask.array
  from dask.array.utils import assert_eq, same_keys
label_desc: Use image node_id 2 for calling a global function with example usage: test_compress() without return types