def analyze_composite_tau(n, x, component_taus):
<EOL>b = beta(n)<EOL>n >>= b<EOL>conditions = [((<NUM_LIT:1><<x) - <NUM_LIT:1>, <NUM_LIT:1><<(x+<NUM_LIT:1>)) for x in component_taus]<EOL>m = max(conditions, key=lambda cond: cond[<NUM_LIT:1>])[<NUM_LIT:1>]<EOL>promoted_rs = []<EOL>for ri, mi in conditions:<EOL><INDENT>q, r = divmod(m, mi)<EOL>if r != <NUM_LIT:0>:<EOL><INDENT>raise ValueError("<STR_LIT>".format(m, mi))<EOL><DEDENT>promoted_rs.append([(ri+i*mi) for i in range(q)])<EOL><DEDENT>out = []<EOL>actual_r = n % m<EOL>all_combos = {tuple(sorted(rs)) for rs in cartesian_product(*promoted_rs)}<EOL>for rs in all_combos:<EOL><INDENT>r = <NUM_LIT:1><EOL>for ri in rs:<EOL><INDENT>r = (r*ri)%m<EOL><DEDENT>if r == actual_r:<EOL><INDENT>out.append(rs)<EOL><DEDENT><DEDENT>if out:<EOL><INDENT>return out, actual_r, m, component_taus<EOL><DEDENT>else:<EOL><INDENT>return []<EOL><DEDENT>
Helper to test_composite_tau(). Given an odd number n and a target tau(n) together with
    a list of the specific tau(p) to be assumed for each prime in n, test if
    the implied conditions on p_i mod 2^{x_i+1} are compatible with n. If such a
    compatibility is possible, return it, else return an empty value.