code: def wrap(wrap_func, func, func_like=None, **kwargs):
      if func_like is None:
          f = partial(wrap_func, func, **kwargs)
      else:
          f = partial(wrap_func, func_like, **kwargs)
      template = """
      Blocked variant of %(name)s
  
      Follows the signature of %(name)s exactly except that it also features
      optional keyword arguments ``chunks: int, tuple, or dict`` and ``name: str``.
  
      Original signature follows below.
      """
      if func.__doc__ is not None:
          f.__doc__ = template % {"name": func.__name__} + func.__doc__
          f.__name__ = "blocked_" + func.__name__
      return f
  
file_path: dask/dask/array/wrap.py
imports: from __future__ import annotations
  from functools import partial
  from itertools import product
  import numpy
  from tlz import curry
  from dask.array.backends import array_creation_dispatch
  from dask.array.core import Array, normalize_chunks
  from dask.array.utils import meta_from_array
  from dask.base import tokenize
  from dask.blockwise import blockwise
  from dask.layers import ArrayChunkShapeDep
  from dask.utils import funcname
label_desc: Use image node_id 4 for calling a global function with example usage: wrap(wrap_func, func, func_like) and returns: f