def __selectPlotFSCPs(FSCPData: pd.DataFrame, showFSCPs: dict, refFuel: str, n_samples: int):
    FSCPsCols = ([None] * len(showFSCPs))
    listOfFSCPs = pd.DataFrame(columns=(FSCPData.keys().tolist() + ['plotIndex']))
    for (index, args) in enumerate(showFSCPs):
        (cols, fuel_x, fuel_y) = args
        if (fuel_x == 'ref'):
            fuel_x = refFuel
        addFSCP = FSCPData.query(f"fuel_x=='{fuel_x}' & fuel_y=='{fuel_y}' & year_x==year_y").reset_index(drop=True)
        if (fuel_x == refFuel):
            addFSCP.loc[:, 'fuel_x'] = 'ref'
        addFSCP.insert(1, 'plotIndex', (len(addFSCP) * [index]))
        FSCPsCols[index] = cols
        listOfFSCPs = pd.concat([listOfFSCPs, addFSCP], ignore_index=True)
    listOfFSCPs['year'] = listOfFSCPs['year_x']
    plotFSCP = listOfFSCPs[['plotIndex', 'fuel_x', 'fuel_y', 'year', 'fscp', 'fscp_uu', 'fscp_ul']]
    plotLines = listOfFSCPs[['plotIndex', 'fuel_x', 'fuel_y', 'year', 'cost_x', 'cost_y', 'ghgi_x', 'ghgi_y']]
    t = np.linspace(plotLines['year'].min(), plotLines['year'].max(), n_samples)
    dtypes = {'year': float, 'cost_x': float, 'cost_y': float, 'ghgi_x': float, 'ghgi_y': float}
    allEntries = []
    for index in plotLines['plotIndex'].unique():
        samples = plotLines.query(f'plotIndex=={index}').reset_index(drop=True).astype(dtypes)
        fuel_x = samples.fuel_x.iloc[0]
        fuel_y = samples.fuel_y.iloc[0]
        new = dict(plotIndex=(n_samples * [int(index)]), fuel_x=(n_samples * [fuel_x]), fuel_y=(n_samples * [fuel_y]), year=t)
        tmp = pd.DataFrame(new, columns=plotLines.keys())
        tmp.index = np.arange(len(samples), (len(tmp) + len(samples)))
        tmp = tmp.merge(samples, how='outer').sort_values(by=['year']).astype(dtypes)
        allEntries.append(tmp.interpolate())
    plotLinesInterpolated = pd.concat(allEntries, ignore_index=True)
    plotLinesInterpolated['fscp'] = ((plotLinesInterpolated['cost_x'] - plotLinesInterpolated['cost_y']) / (plotLinesInterpolated['ghgi_y'] - plotLinesInterpolated['ghgi_x']))
    return (FSCPsCols, plotFSCP, plotLinesInterpolated)
def __selectPlotFSCPs(FSCPData: pd.DataFrame, showFSCPs: dict, refFuel: str, n_samples: int):
    FSCPsCols = ([None] * len(showFSCPs))
    listOfFSCPs = pd.DataFrame(columns=(FSCPData.keys().tolist() + ['plotIndex']))
    for (index, args) in enumerate(showFSCPs):
        (cols, fuel_x, fuel_y) = args
        if (fuel_x == 'ref'):
            fuel_x = refFuel
        addFSCP = FSCPData.query(f"fuel_x=='{fuel_x}' & fuel_y=='{fuel_y}' & year_x==year_y").reset_index(drop=True)
        if (fuel_x == refFuel):
            addFSCP.loc[:, 'fuel_x'] = 'ref'
        addFSCP.insert(1, 'plotIndex', (len(addFSCP) * [index]))
        FSCPsCols[index] = cols
        listOfFSCPs = pd.concat([listOfFSCPs, addFSCP], ignore_index=True)
    listOfFSCPs['year'] = listOfFSCPs['year_x']
    plotFSCP = listOfFSCPs[['plotIndex', 'fuel_x', 'fuel_y', 'year', 'fscp', 'fscp_uu', 'fscp_ul']]
    plotLines = listOfFSCPs[['plotIndex', 'fuel_x', 'fuel_y', 'year', 'cost_x', 'cost_y', 'ghgi_x', 'ghgi_y']]
    t = np.linspace(plotLines['year'].min(), plotLines['year'].max(), n_samples)
    dtypes = {'year': float, 'cost_x': float, 'cost_y': float, 'ghgi_x': float, 'ghgi_y': float}
    allEntries = []
    for index in plotLines['plotIndex'].unique():
        samples = plotLines.query(f'plotIndex=={index}').reset_index(drop=True).astype(dtypes)
        fuel_x = samples.fuel_x.iloc[0]
        fuel_y = samples.fuel_y.iloc[0]
        new = dict(plotIndex=(n_samples * [int(index)]), fuel_x=(n_samples * [fuel_x]), fuel_y=(n_samples * [fuel_y]), year=t)
        tmp = pd.DataFrame(new, columns=plotLines.keys())
        tmp.index = np.arange(len(samples), (len(tmp) + len(samples)))
        tmp = tmp.merge(samples, how='outer').sort_values(by=['year']).astype(dtypes)
        allEntries.append(tmp.interpolate())
    plotLinesInterpolated = pd.concat(allEntries, ignore_index=True)
    plotLinesInterpolated['fscp'] = ((plotLinesInterpolated['cost_x'] - plotLinesInterpolated['cost_y']) / (plotLinesInterpolated['ghgi_y'] - plotLinesInterpolated['ghgi_x']))
    return (FSCPsCols, plotFSCP, plotLinesInterpolated)