class_docstr: A tool for image augmentation.
  
  For operations with inplace=True, the returned value is the ImageTool
  instance self, which is for chaining multiple operations; Otherwise, the
  preprocessed images would be returned.
  
  For operations that has countable pre-processing cases, argument num_case
  could be set to decide the number of pre-processing cases to apply.
  Typically, it is set to 1 for training phases and to the max for test
  phases.
class_docstr_tok: ["A","tool","for","image","augmentation",".","For","operations","with","inplace=True",",","the","returned","value","is","the","ImageTool","instance","self",",","which","is","for","chaining","multiple","operations",";","Otherwise",",","the","preprocessed","images","would","be","returned",".","For","operations","that","has","countable","pre-processing","cases",",","argument","num_case","could","be","set","to","decide","the","number","of","pre-processing","cases","to","apply",".","Typically",",","it","is","set","to","1","for","training","phases","and","to","the","max","for","test","phases","."]
docstr: Crop at positions from [left_top, left_bottom, right_top,
  right_bottom, and center].
  
  Args:
      patch(tuple): width and height of the result image.
      num_case: num of cases, must be in [1,5]
      inplace: inplace imgs or not ( return new_imgs)
code: def crop5(self, patch, num_case=1, inplace=True):
      """Crop at positions from [left_top, left_bottom, right_top,
      right_bottom, and center].
  
      Args:
          patch(tuple): width and height of the result image.
          num_case: num of cases, must be in [1,5]
          inplace: inplace imgs or not ( return new_imgs)
      """
      new_imgs = []
      positions = [
          "left_top",
          "left_bottom",
          "right_top",
          "right_bottom",
          "center",
      ]
      if num_case > 5 or num_case < 1:
          raise Exception("num_case must be in [1,5]")
      for img in self.imgs:
          if num_case < 5:
              positions = get_list_sample(positions, num_case)
  
          for position in positions:
              new_img = crop(img, patch, position)
              new_imgs.append(new_img)
  
      if inplace:
          self.imgs = new_imgs
          return self
      else:
          return new_imgs
  
imports: from __future__ import division
  from builtins import range
  from builtins import object
  import random
  import numpy
  from PIL import Image, ImageEnhance
  import math
label_desc: Use image node_id 15 for calling the ImageTool obj's underlying member method code with example usage: obj.crop5(patch, num_case, inplace) and returns: self, new_imgs