code: def __init__(self, image_or_list, mask=None):
      try:
          if mask:
              self.h = image_or_list.histogram(mask)
          else:
              self.h = image_or_list.histogram()
      except AttributeError:
          self.h = image_or_list  # assume it to be a histogram list
      if not isinstance(self.h, list):
          raise TypeError("first argument must be image or list")
      self.bands = list(range(len(self.h) // 256))
  
file_path: catboost/contrib/python/Pillow/py2/PIL/ImageStat.py
imports: import functools
  import math
  import operator
label_desc: Use image node_id 1 to create a new Stat object from inherited base classes: object with example: obj = Stat(image_or_list, mask)