def _basify_factors(factors):
    """Convert `(f_i, k)` factors to Basic expressions. """
    if type(factors) is tuple:
        return factors[0], [ (g.as_basic(), k) for g, k in factors[1] ]
    else:
        return [ (g.as_basic(), k) for g, k in factors ]