def remove_rule(self, rule):
        """Remove rule from :attr:`R` and its corresponding weight from
        :attr:`W`.

        :param rule: rule to remove
        :type rule:
            :class:`~creamas.rules.rule.Rule` or
            :class:`~creamas.rules.rule.RuleLeaf`
        :raises TypeError:
            If rule is not derived from :class:`Rule` or :class:`RuleLeaf`.
        :returns:
            ``True`` if the rule was successfully removed, otherwise ``False``.
        :rtype bool:
        """
        if not issubclass(rule.__class__, (Rule, RuleLeaf)):
            raise TypeError(
                "Rule to remove ({}) is not subclass of {} or {}."
                .format(rule.__class__, Rule, RuleLeaf))
        try:
            ind = self._R.index(rule)
            del self._R[ind]
            del self._W[ind]
            return True
        except:
            return False