def METHOD_NAME(self, name, masterid):
    deactivated = yield self.master.db.masters.setMasterState(
        masterid=masterid, active=False)
    if deactivated:
        yield self._masterDeactivated(masterid, name)