code: def ndindex(
      shape: Tuple,
  ) -> Generator:
      """Multidimensional index iterator.
  
      Parameters
      ----------
      shape
          The shape of the array to iterate over.
  
      Returns
      -------
      ret
          An iterator yielding array coordinates.
  
      Examples
      --------
      >>> a = ivy.array([[1, 2], [3, 4]])
      >>> for index in ivy.ndindex(a):
      >>>     print(index)
      (0, 0)
      (0, 1)
      (1, 0)
      (1, 1)
      """
      args = [range(k) for k in shape]
      return _iter_product(*args)
  
imports: from typing import Union, Tuple, Optional, Sequence, Iterable, Generator
  import warnings
  import ivy
  from ivy.utils.backend import current_backend
  from ivy.utils.exceptions import handle_exceptions
  from ivy.func_wrapper import outputs_to_ivy_arrays, handle_nestable, to_native_arrays_and_back, handle_out_argument, infer_dtype, handle_array_like_without_promotion, inputs_to_ivy_arrays, handle_device, handle_backend_invalid, handle_array_function
label_desc: Use image node_id 10 for calling a global function with example usage: ndindex(shape) and returns: _iter_product