def __init__ (self, proj):
    """Connect with the brain databases"""

    self.datasetcfg = proj.datasetcfg 
    self.proj = proj

    # Are there exceptions?
    #self.EXCEPT_FLAG = self.proj.getExceptions()
    self.KVENGINE = self.proj.getKVEngine()

    # Choose the I/O engine for key/value data
    if self.proj.getKVEngine() in 'MySQL':
      import mysqlkvio
      self.kvio = mysqlkvio.MySQLKVIO(self)
      self.NPZ = True
      # Connection info for the metadata
      try:
        self.conn = MySQLdb.connect (host = self.proj.getDBHost(), user = self.proj.getDBUser(), passwd = self.proj.getDBPasswd(), db = self.proj.getDBName())
        # start with no cursor
        self.cursor = None
      except MySQLdb.Error, e:
        self.conn = None
        logger.error("Failed to connect to database: {}, {}".format(self.proj.getDBHost(), self.proj.getDBName()))
    
    elif self.proj.getKVEngine() == 'Riak':
      import riakkvio
      self.conn = None
      self.cursor = None
      self.kvio = riakkvio.RiakKVIO(self)
      self.NPZ = False
    
    elif self.proj.getKVEngine() == 'Cassandra':
      import casskvio
      self.conn = None
      self.cursor = None
      self.kvio = casskvio.CassandraKVIO(self)
      self.NPZ = False
    else:
      raise OCPCAError ("Unknown key/value store. Engine = {}".format(self.proj.getKVEngine()))

    #if (self.proj.getChannelType() in ocpcaproj.ANNOTATION_CHANNELS):
    self.annoIdx = annindex.AnnotateIndex ( self.kvio, self.proj )
dataset/ETHPy150Open neurodata/ndstore/ocpca/ocpcadb.py/OCPCADB.__init__/operator `==` -> `in`