def handle_cmd(self, db, commands, cmd, args):
        cb = commands.get(cmd)
        if cb:
            try:
                resp = cb(db, *args) if db is not None else cb(*args)
            except __HOLE__ as e:
                self.logger.warning("Invalid arguments: {}", e)
                resp = protocol.msg.format_response(
                    cmd, status=protocol.status.INVALID_ARGS)
        else:
            self.logger.warning("Command not found: {}", cmd)
            resp = protocol.msg.format_response(
                cmd, status=protocol.status.CMD_NOT_FOUND)
        return resp
dataset/ETHPy150Open onitu/onitu/onitu/escalator/server/worker.py/Worker.handle_cmd