def _trial(factors, n, candidates, verbose=False):
    if verbose:
        factors0 = list(factors.keys())
    nfactors = len(factors)
    for d in candidates:
        if n % d == 0:
            m = multiplicity(d, n)
            n //= d**m
            factors[d] = m
    if verbose:
        for k in sorted(set(factors).difference(set(factors0))):
            print(factor_msg % (k, factors[k]))
    return int(n), len(factors) != nfactors
Helper function for integer factorization. Trial factors ``n`
dataset/ETHPy150Open sympy/sympy/sympy/ntheory/factor_.py/_trial