code: def flip(a, axis=None):
      """Reverse the order of elements in an array along the given axis.
  
      Note that ``flip`` function has been introduced since NumPy v1.12.
      The contents of this document is the same as the original one.
  
      Args:
          a (~cupy.ndarray): Input array.
          axis (int or tuple of int or None): Axis or axes along which to flip
              over. The default, ``axis=None``, will flip over all of the axes of
              the input array. If axis is negative it counts from the last to the
              first axis. If axis is a tuple of ints, flipping is performed on
              all of the axes specified in the tuple.
  
      Returns:
          ~cupy.ndarray: Output array.
  
      .. seealso:: :func:`numpy.flip`
  
      """
      axes = internal._normalize_axis_indices(axis, a.ndim)
      return _flip(a, axes)
  
file_path: cupy/cupy/_manipulation/rearrange.py
imports: import itertools
  import numpy
  import cupy
  from cupy._core import internal
label_desc: Use image node_id 1 for calling a global function with example usage: flip(a, axis) and returns: _flip