def process_wildcard(composition):
    """
    Processes element with a wildcard ``?`` weight fraction and returns
    composition balanced to 1.0. 
    """
    composition2 = composition.copy()

    wildcard_zs = set()
    total_wf = 0.0
    for z, wf in composition.items():
        if wf == "?":
            wildcard_zs.add(z)
        else:
            total_wf += wf

    if not wildcard_zs:
        return composition2

    balance_wf = (1.0 - total_wf) / len(wildcard_zs)
    for z in wildcard_zs:
        composition2[z] = balance_wf

    return composition2