<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def declare(self, name, text='', doc=None, attrs=None, attr_docs=None):
 """ Declare a rule. This allows a default for a given rule to be set, along with default values for the authorization attributes. This function can also include documentation for the rule and the authorization attributes, allowing a sample policy configuration file to be generated. :param name: The name of the rule. :param text: The text of the rule. Defaults to the empty string. :param doc: A string documenting the purpose of the rule. :param attrs: A dictionary of default values for the authorization attributes. Note that authorization attributes cannot have names beginning with an underscore ("_"). :param attr_docs: A dictionary of strings for documenting the purpose of the authorization attributes. """


        self._defaults[name] = rules.Rule(name, text, attrs)
        self._docs[name] = rules.RuleDoc(name, doc, attr_docs)

        return self._defaults[name]