def add_rule(self, rule_class, target_class=_Nothing):
if isinstance(target_class, Iterable):<EOL><INDENT>for cls in target_class:<EOL><INDENT>self._rules[cls] = rule_class<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self._rules[target_class] = rule_class<EOL><DEDENT>
Adds an authorization rule.

        :param rule_class: a class of authorization rule.
        :param target_class: (optional) a class
            or an iterable with classes to associate the rule with.