<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def with_rule(self, rule):
 """ Adds validation rule to this schema. This method returns reference to this exception to implement Builder pattern to chain additional calls. :param rule: a validation rule to be added. :return: this validation schema. """

        self.rules = self.rules if self.rules != None else []
        self.rules.append(rule)
        return self