def AppendSolution(df, func, **kwargs):
    """
    Appends a solution to the dataframe
    Parameters
    ----------
    df: pd.DataFrame
        A dataframe containing the extracted
        properties for the edges/nodes.
    func: function
        A function that takes a dataframe
        and returns a solution.
    Returns
    -------
    df: pd.DataFrame
        A dataframe containing the extracted
        properties for the edges/nodes with
        a solution.
    """
    # Get solution
    df.loc[:, "solution"] = df.apply(lambda x: func(x), axis=1, **kwargs)

    return df