def METHOD_NAME(self, connection):
    if connection:
        return connection
    res = self.db.METHOD_NAME()
    if res["OK"]:
        return res["Value"]
    gLogger.warn("Failed to get MySQL connection", res["Message"])
    return connection