code: def __init__(self, shape, dtype):
      if dtype is np.int32:
          type_flag = "i"
      elif dtype is np.int64:
          type_flag = "l"
      elif dtype is np.float32:
          type_flag = "f"
      elif dtype is np.float64:
          type_flag = "d"
      else:
          raise Exception("Dtype not supported.")
  
      self.shape = shape
      self.dtype = dtype
  
      self.rows = array.array("i")
      self.cols = array.array("i")
      self.data = array.array(type_flag)
  
imports: import array
  import numpy
  import scipy.sparse
  import sklearn.preprocessing
label_desc: Use image node_id 1 to create a new _IncrementalCOOMatrix object from inherited base classes: object with example: obj = _IncrementalCOOMatrix(shape, dtype)