def METHOD_NAME(network, key):
    """Join the edges incidental on the given node, if there are exactly two incident edges.
    Parameters
    ----------
    network : :class:`~compas.geometry.Network`
        A network data structure.
    key : hashable
        The node identifier.
    Returns
    -------
    None
        The network is modified in place.
    Notes
    -----
    A new edge is created to replace the two joined edges.
    The attributes of the joined edges are not transferred to the new edge.
    Therefore, the new edge has only default edge attributes.
    """
    nbrs = network.vertex_neighbors(key)
    if len(nbrs) != 2:
        return
    a, b = nbrs
    if a in network.edge[key]:
        del network.edge[key][a]
    else:
        del network.edge[a][key]
    del network.halfedge[key][a]
    del network.halfedge[a][key]
    if b in network.edge[key]:
        del network.edge[key][b]
    else:
        del network.edge[b][key]
    del network.halfedge[key][b]
    del network.halfedge[b][key]
    del network.vertex[key]
    del network.halfedge[key]
    del network.edge[key]
    # set attributes based on average of two joining edges?
    network.add_edge((a, b))