code: def test_percentiles_with_scaler_percentile(q):
      # Regression test to ensure da.percentile works with scalar percentiles
      # See #3020
      d = da.from_array(cupy.ones((16,)), chunks=(4,))
      result = da.percentile(d, q, method="midpoint")
      assert type(result._meta) == cupy.ndarray
      assert_eq(
          result, result
      )  # Check that _meta and computed arrays match types
      assert_eq(result, np.array([1], dtype=d.dtype), check_type=False)
  
file_path: dask/dask/array/tests/test_cupy_percentile.py
imports: from __future__ import annotations
  import numpy
  import pytest
  import dask.array
  from dask.array.utils import assert_eq, same_keys
label_desc: Use image node_id 5 for calling a global function with example usage: test_percentiles_with_scaler_percentile(q) without return types