def set_line_coordinates(vertices):
    """
    Add coordinates columns ('xA','xB','yA','yB') to the dataframe *vertices* ;
    in-place.

    The end node coordinates of each geometry (edge) of *vertices* are
    computed and  stored in their associated column (first end -> 'A', second
    end -> 'B').

    Parameters
    ----------
    vertices: DataFrame
        Dataframe of the vertices.
    """
    for idx, row in vertices.iterrows():
        coords = list(row['geometry'].coords)
        vertices.at[idx, 'xA'] = coords[0][0]
        vertices.at[idx, 'yA'] = coords[0][1]
        vertices.at[idx, 'xB'] = coords[-1][0]
        vertices.at[idx, 'yB'] = coords[-1][1]
