code: def wrap(func_name):
      """
      Wrap a function.
      """
  
      def wrapped(self, *a, **kw):
          a = getattr(self.arr, func_name)(*a, **kw)
          return a if not isinstance(a, np.ndarray) else type(self)(a)
  
      return wrapped
  
imports: from __future__ import annotations
  import operator
  import numpy
  import pytest
  import dask.array
  from dask.array import Array
  from dask.array.chunk_types import is_valid_array_chunk, is_valid_chunk_type
  from dask.array.utils import assert_eq
label_desc: Use image node_id 1 for calling a global function with example usage: wrap(func_name) and returns: wrapped, unknown