code: def ten_crop(src, size):
      """Crop 10 regions from an array.
      This is performed same as:
      http://chainercv.readthedocs.io/en/stable/reference/transforms.html#ten-crop
  
      This method crops 10 regions. All regions will be in shape
      :obj`size`. These regions consist of 1 center crop and 4 corner
      crops and horizontal flips of them.
      The crops are ordered in this order.
      * center crop
      * top-left crop
      * bottom-left crop
      * top-right crop
      * bottom-right crop
      * center crop (flipped horizontally)
      * top-left crop (flipped horizontally)
      * bottom-left crop (flipped horizontally)
      * top-right crop (flipped horizontally)
      * bottom-right crop (flipped horizontally)
  
      Parameters
      ----------
      src : mxnet.nd.NDArray
          Input image.
      size : tuple
          Tuple of length 2, as (width, height) of the cropped areas.
  
      Returns
      -------
      mxnet.nd.NDArray
          The cropped images with shape (10, size[1], size[0], C)
  
      """
      h, w, _ = src.shape
      ow, oh = size
  
      if h < oh or w < ow:
          raise ValueError(
              "Cannot crop area {} from image with size ({}, {})".format(
                  str(size), h, w
              )
          )
  
      center = src[
          (h - oh) // 2 : (h + oh) // 2,
          (w - ow) // 2 : (w + ow) // 2,
          :,
      ]
      tl = src[0:oh, 0:ow, :]
      bl = src[h - oh : h, 0:ow, :]
      tr = src[0:oh, w - ow : w, :]
      br = src[h - oh : h, w - ow : w, :]
      crops = nd.stack(*[center, tl, bl, tr, br], axis=0)
      crops = nd.concat(*[crops, nd.flip(crops, axis=2)], dim=0)
      return crops
  
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 8 for calling a global function with example usage: ten_crop(src, size) and returns: crops