def METHOD_NAME(varnames):
    """Decorator for validating attrs that are conditioned on."""
    def gp_wrapper(cls):
        def make_getter(name):
            def getter(self):
                value = getattr(self, name, None)
                if value is None:
                    raise AttributeError(
                        "'{}' not set.  Provide as argument "
                        "to condition, or call 'prior' "
                        "first".format(name.lstrip("_"))
                    )
                else:
                    return value
                return getattr(self, name)
            return getter
        def make_setter(name):
            def setter(self, val):
                setattr(self, name, val)
            return setter
        for name in varnames:
            getter = make_getter("_" + name)
            setter = make_setter("_" + name)
            setattr(cls, name, property(getter, setter))
        return cls
    return gp_wrapper