def _extract_digits(rut) -> Tuple[int, str]:
        """Extracts the digits and check digit from a formatted RUT."""
        char_filter = re.compile(r"[^0-9]")
        check_digit = rut[-1]
        digits = char_filter.sub("", rut[:-1])

        return int(digits), check_digit
Extracts the digits and check digit from a formatted RUT.
tests/providers/test_ssn.py