code: def take_along_axis(
      arr: Union[ivy.Array, ivy.NativeArray],
      indices: Union[ivy.Array, ivy.NativeArray],
      axis: int,
      /,
      *,
      mode: str = "fill",
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Take values from the input array by matching 1d index and data slices.
  
      Parameters
      ----------
      arr
          The source array.
      indices
          The indices of the values to extract.
      axis
          The axis over which to select values.
          If axis is None, arr is treated as a flattened 1D array.
      mode
          One of: 'clip', 'fill', 'drop'. Parameter controlling how out-of-bounds indices
          will be handled.
      out
          The output array.
  
      Returns
      -------
      ret
          The returned array has the same shape as `indices`.
  
      Examples
      --------
      >>> arr = ivy.array([[4, 3, 5], [1, 2, 1]])
      >>> indices = ivy.array([[0, 1, 1], [2, 0, 0]])
      >>> y = ivy.take_along_axis(arr, indices, 1)
      >>> print(y)
      ivy.array([[4, 3, 3], [1, 1, 1]])
      """
      return ivy.current_backend(arr).take_along_axis(
          arr, indices, axis, mode=mode, out=out
      )
  
imports: from typing import Optional, Union, Tuple, Iterable, Sequence, Callable, Any, Literal, List
  from numbers import Number
  from functools import partial
  import math
  import ivy
  from ivy.func_wrapper import handle_out_argument, handle_partial_mixed_function, to_native_arrays_and_back, inputs_to_native_shapes, handle_nestable, handle_array_like_without_promotion, handle_view, inputs_to_ivy_arrays, handle_array_function, handle_device, handle_backend_invalid
  from ivy.functional.ivy.general import _numel
  from ivy.utils.backend import current_backend
  from ivy.utils.exceptions import handle_exceptions
label_desc: Use image node_id 33 for calling a global function with example usage: take_along_axis() and returns: ivy