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: Args:
      num_case: num of rotate cases, must be <= the length of angle_list
      inplace: inplace imgs or not ( return new_imgs)
code: def rotate_by_list(self, angle_list, num_case=1, inplace=True):
      """
      Args:
          num_case: num of rotate cases, must be <= the length of angle_list
          inplace: inplace imgs or not ( return new_imgs)
      """
      new_imgs = []
      if num_case < 1 or num_case > len(angle_list):
          raise Exception(
              "num_case must be smaller in [1,%d(length of angle_list)]"
              % len(angle_list)
          )
  
      for img in self.imgs:
          if num_case == len(angle_list):
              angles = angle_list
          else:
              angles = get_list_sample(angle_list, num_case)
  
          for angle in angles:
              new_img = img.rotate(angle)
              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 14 for calling the ImageTool obj's underlying member method code with example usage: obj.rotate_by_list(angle_list, num_case, inplace) and returns: self, new_imgs