<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reg_to_lex(conditions, wildcards):
 """Transform a regular expression into a LEPL object. Replace the wildcards in the conditions by LEPL elements, like xM will be replaced by Any() & 'M'. In case of multiple same wildcards (like xMx), aliases are created to allow the regexp to compile, like Any() > 'x_0' & 'M' & Any() > 'x_1', and we chech that the matched values for all aliases like x_0, x_1 are the same. """

    aliases = defaultdict(set)
    n_conds = []

    # All conditions
    for i, _ in enumerate(conditions):
        n_cond = []

        for char in conditions[i]:
            if char in wildcards:
                alias = '%s_%s' % (char, len(aliases[char]))
                aliases[char].add(alias)
                n_cond.append(make_token(alias, reg=wildcards[char]))
            else:
                n_cond.append(~Literal(char))

        n_cond.append(Eos())
        n_conds.append(reduce(operator.and_, n_cond) > make_dict)

    return tuple(n_conds), aliases