<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_rule(self, pattern, css_class):
 """Add a new rule. Parameters pattern: str Pattern that is compiled to a regular expression. css_class: str The class that will corresponds to given pattern. """

        #print('adding rule <{0}> <{1}>'.format(pattern, css_class))
        self.__patterns.append(re.compile(pattern, flags=re.U | re.M))
        self.__css_classes.append(css_class)