code: def index_nest(
      nest: Union[
          List, Tuple, Dict, ivy.Array, ivy.NativeArray, ivy.Container
      ],
      index: Union[List[int], Tuple[int], Iterable[int]],
      /,
  ) -> Any:
      """Index a nested object, using a tuple of indices or keys in the case of
      dicts.
  
      Parameters
      ----------
      nest
          The nested object to index.
      index
          A tuple of indices for indexing.
  
      Returns
      -------
      ret
          The result element through indexing the nested object.
  
      Examples
      --------
      With :code:`Tuple` inputs:
  
      >>> x = (1, 2)
      >>> y = [0]
      >>> z = ivy.index_nest(x, y)
      >>> print(z)
      1
  
      With :class:`ivy.Array` inputs:
  
      >>> x = ivy.array([[1., 2.],
      ...                [3., 4.]])
      >>> y = [1]
      >>> z = ivy.index_nest(x, y)
      >>> print(z)
      ivy.array([3., 4.])
  
      With :class:`ivy.Container` inputs:
  
      >>> x = ivy.Container(a = ivy.array([[1.,2.], [3.,4.]]),
      ...                   b = (50,60))
      >>> y = [1]
      >>> z = ivy.index_nest(x, y)
      >>> print(z)
      {
          a: ivy.array([3., 4.]),
          b: 60
      }
  
      With :code:`Dict` input:
  
      >>> x = {'a': 0, 'b': [1, [2, 3]], 'c': (4, 5)}
      >>> y = ('b', 1)
      >>> z = ivy.index_nest(x, y)
      >>> print(z)
      [2, 3]
  
      With :code:`List` inputs:
  
      >>> x = [['a', 'b', 'c'],
      ...      ['d', 'e', 'f'],
      ...      ['g', ['h', 'i']]]
      >>> y = iter([2, 1, 0])
      >>> z = ivy.index_nest(x, y)
      >>> print(z)
      h
      """
      ret = nest
      for i in index:
          ret = ret[i]
      return ret
  
imports: from builtins import map
  from typing import Callable, Any, Union, List, Tuple, Optional, Dict, Iterable, Sequence
  from collections import UserDict, OrderedDict
  import ivy
  from ivy.utils.exceptions import handle_exceptions
label_desc: Use image node_id 1 for calling a global function with example usage: index_nest() and returns: ret