def METHOD_NAME(self, instance):
    invalid = self.get_invalid(instance)
    if invalid:
        self.log.error("Invalid nodes: {0}".format(invalid))
        raise PublishValidationError(
            ("Invalid particle caches in instance. "
             "See logs for details."))