code: def test_map_overlap_rechunks_array_if_needed():
      # https://github.com/dask/dask/issues/6597
      expected = np.arange(11)
      x = da.from_array(expected, chunks=5)
      y = x.map_overlap(lambda x: x, depth=2, boundary=0)
      assert all(c >= 2 for c in y.chunks[0])
      assert_eq(y, expected)
  
imports: from __future__ import annotations
  import pytest
  import numpy
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  import dask.array
  from dask.array.lib.stride_tricks import sliding_window_view
  from dask.array.overlap import boundaries, constant, ensure_minimum_chunksize, nearest, overlap, overlap_internal, periodic, reflect, trim_internal
  from dask.array.utils import assert_eq, same_keys
label_desc: Use image node_id 37 for calling a global function with example usage: test_map_overlap_rechunks_array_if_needed() without return types