def _pair_members_to_new_node(dm, i, j, disallow_negative_branch_length):
    """Return the distance between a new node and decendants of that new node.

    Parameters
    ----------
    dm : skbio.DistanceMatrix
        The input distance matrix.
    i, j : str
        Identifiers of entries in the distance matrix to be collapsed (i.e.,
        the descendents of the new node, which is internally represented as
        `u`).
    disallow_negative_branch_length : bool
        Neighbor joining can result in negative branch lengths, which don't
        make sense in an evolutionary context. If `True`, negative branch
        lengths will be returned as zero, a common strategy for handling this
        issue that was proposed by the original developers of the algorithm.

    """
    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
