def _pair_members_to_new_node(dm, i, j, disallow_negative_branch_length):
    n = dm.shape[0]
    i_to_j = dm[i, j]
    i_to_u = (0.5 * i_to_j) + ((dm[i].sum() - dm[j].sum()) / (2 * (n - 2)))

    if disallow_negative_branch_length and i_to_u < 0:
        i_to_u = 0

    j_to_u = i_to_j - i_to_u

    if disallow_negative_branch_length and j_to_u < 0:
        j_to_u = 0

    return i_to_u, j_to_u
Creates a dictionary of SVG layers
dataset/ETHPy150Open biocore/scikit-bio/skbio/tree/_nj.py/_pair_members_to_new_node--crossover with--dataset/ETHPy150Open boldport/pcbmode/pcbmode/utils/svg.py/create_layers_for_gerber_svg