code: def dask_rolling_wrapper(moving_func, a, window, min_count=None, axis=-1):
      '''wrapper to apply bottleneck moving window funcs on dask arrays'''
      dtype, fill_value = dtypes.maybe_promote(a.dtype)
      a = a.astype(dtype)
      # inputs for overlap
      if axis < 0:
          axis = a.ndim + axis
      depth = {d: 0 for d in range(a.ndim)}
      depth[axis] = (window + 1) // 2
      boundary = {d: fill_value for d in range(a.ndim)}
      # Create overlap array.
      ag = overlap(a, depth=depth, boundary=boundary)
      # apply rolling func
      out = ag.map_blocks(moving_func, window, min_count=min_count,
                          axis=axis, dtype=a.dtype)
      # trim array
      result = trim_internal(out, depth)
      return resulf dask_rolling_wrapper(moving_func, a, window, min_count=None, axis=-1):
      '''wrapper to apply bottleneck moving window funcs on dask arrays'''
      dtype, fill_value = dtypes.maybe_promote(a.dtype)
      a = a.astype(dtype)
      # inputs for overlap
      if axis < 0:
          axis = a.ndim + axis
      depth = {d: 0 for d in range(a.ndim)}
      depth[axis] = (window + 1) // 2
      boundary = {d: fill_value for d in range(a.ndim)}
      # Create overlap array.
      ag = overlap(a, depth=depth, boundary=boundary)
      # apply rolling func
      out = ag.map_blocks(moving_func, window, min_count=min_count,
                          axis=axis, dtype=a.dtype)
      # trim array
      result = trim_internal(out, depth)
      return result
docs: wrapper to apply bottleneck moving window funcs on dask arrays