def purge(name):
    """Removes instance types from database."""
    if name is None:
        raise exception.InvalidInstanceType(instance_type=name)
    else:
        try:
            db.instance_type_purge(context.get_admin_context(), name)
        except exception.NotFound:
            LOG.exception(name % _('Instance type %s not found for purge'))
            raise exception.ApiError(_("Unknown instance type: %s") % name)
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/compute/instance_types.py/purge/swapped operands of `%`