Add subrule to the rule.

        :param subrule:
            Subrule to add to this rule, an instance of :class:`Rule` or
            :class:`RuleLeaf`.

        :param float weight: Weight of the subrule

def add_subrule(self, subrule, weight):
        """Add subrule to the rule.

        :param subrule:
            Subrule to add to this rule, an instance of :class:`Rule` or
            :class:`RuleLeaf`.

        :param float weight: Weight of the subrule
        """
        if not issubclass(subrule.__class__, (Rule, RuleLeaf)):
            raise TypeError("Rule's class must be (subclass of) {} or {}, got "
                            "{}.".format(Rule, RuleLeaf, subrule.__class__))
        self.__domains = set.union(self.__domains, subrule.domains)
        self.R.append(subrule)
        self.W.append(weight)