code: def random_flip(src, px=0, py=0, copy=False):
      """Randomly flip image along horizontal and vertical with probabilities.
  
      Parameters
      ----------
      src : mxnet.nd.NDArray
          Input image with HWC format.
      px : float
          Horizontal flip probability [0, 1].
      py : float
          Vertical flip probability [0, 1].
      copy : bool
          If `True`, return a copy of input
  
      Returns
      -------
      mxnet.nd.NDArray
          Augmented image.
      tuple
          Tuple of (flip_x, flip_y), records of whether flips are applied.
  
      """
      flip_y = np.random.choice([False, True], p=[1 - py, py])
      flip_x = np.random.choice([False, True], p=[1 - px, px])
      if flip_y:
          src = nd.flip(src, axis=0)
      if flip_x:
          src = nd.flip(src, axis=1)
      if copy:
          src = src.copy()
      return src, (flip_x, flip_y)
  
file_path: gluon-cv/gluoncv/data/transforms/image.py
imports: from __future__ import division
  import random
  import numpy
  import mxnet
  from mxnet import nd
  from mxnet.base import numeric_types
label_desc: Use image node_id 6 for calling a global function with example usage: random_flip(src, px, py, copy) and returns: src,  flip_x,  flip_y