code: def rule_for(self, target_class):
          
          def decorator(rule_class):
              self.add_rule(rule_class, target_class)
              return rule_class
          return decorator
docs: Decorates and adds an authorization rule
          for a specified class(es) of objects.
  
          :param target_class: a class or an iterable with classes
              to associate the rule with.