def _diff_target(node1, node2, gens):
    """
    Calc fitness based on the fact that two nodes should not share same target.
    """
    shared_tg = None
    for src in gens:
        if shared_tg is None and src in [node1, node2]:
            shared_tg = gens[src]
        elif shared_tg is not None and gens[src] == shared_tg:
            return 10.0
    return 0.0
