def _find_prime_factors(n):
    """
    Find all the prime factors of `n`, sorted from largest to smallest

    Parameters
    ----------
    n : int
        Number to factorize

    Returns
    -------
    factors : list[int]

    Notes
    -----
    From http://stackoverflow.com/questions/15347174/python-finding-prime-factors

    Examples
    --------
    >>> _find_prime_factors(8)
    [2, 2, 2]

    >>> _find_prime_factors(25)
    [5, 5]

    >>> _find_prime_factors(26)
    [13, 2]

    >>> _find_prime_factors(29)
    [29]

    >>> _find_prime_factors(14)
    [7, 2]

    >>> _find_prime_factors(12)
    [3, 2, 2]
    """
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    factors = sorted(factors, reverse=True)
    return factors