def METHOD_NAME(self) -> List[ReplacementRule]:
    """Computes the rules for the current tree."""
    self._extract_rules()
    self._clean_rules()
    self._sort_rules()
    assert self._rules is not None  # Keep mypy happy
    return self._rules