def METHOD_NAME(self):
    self.lock.acquire()
    if self.engine:
        self.logger.debug("Using SQLAlchemy v.%s" % sqlalchemy_version)
        if isinstance(self.dia, MySQLDialect):
            from WMCore.Database.MySQLCore import MySQLInterface as DBInterface
        else:
            from WMCore.Database.DBCore import DBInterface
        # we instantiate within the lock so we can safely return the local instance.
        dbInterface =  DBInterface(self.logger, self.engine)
    else:
        dbInterface =  None
    self.lock.release()
    return dbInterface