class_docstr: Utility class for recursing over nested iterables
docstr: Iterate over x, yielding (index, value, entering), where
  
  * ``index``: a tuple of indices up to this point
  * ``value``: equal to ``x[index[0]][...][index[-1]]``. On the first iteration, is
               ``x`` itself
  * ``entering``: bool. The result of ``recurse_if(value)``
code: def walk(self, x, index=()):
      """
      Iterate over x, yielding (index, value, entering), where
  
      * ``index``: a tuple of indices up to this point
      * ``value``: equal to ``x[index[0]][...][index[-1]]``. On the first iteration, is
                   ``x`` itself
      * ``entering``: bool. The result of ``recurse_if(value)``
      """
      do_recurse = self.recurse_if(x)
      yield index, x, do_recurse
  
      if not do_recurse:
          return
      for i, xi in enumerate(x):
          # yield from ...
          yield from self.walk(xi, index + (i,))
  
file_path: dask/dask/array/numpy_compat.py
imports: from __future__ import annotations
  import warnings
  import numpy
  from packaging.version import parse
  from dask.utils import derived_from
label_desc: Use image node_id 3 for calling the _Recurser obj's underlying member method code with example usage: obj.walk(x, index) without return types