def get_fractional_quantity_remaining(
    processed_cycler_run, metric="discharge_energy", diagnostic_cycle_type="rpt_0.2C"
):
    """
    Determine relative loss of <metric> in diagnostic_cycles of type <diagnostic_cycle_type> after 100 regular cycles


    Args:
        processed_cycler_run (beep.structure.ProcessedCyclerRun): information about cycler run
        metric (str): column name to use for measuring degradation
        diagnostic_cycle_type (str): the diagnostic cycle to use for computing the amount of degradation

    Returns:
        a dataframe with cycle_index and corresponding degradation relative to the first measured value
    """
    summary_diag_cycle_type = processed_cycler_run.diagnostic_summary[
        (processed_cycler_run.diagnostic_summary.cycle_type == diagnostic_cycle_type)
        & (processed_cycler_run.diagnostic_summary.cycle_index > 100)
    ].reset_index()
    summary_diag_cycle_type = summary_diag_cycle_type[["cycle_index", metric]]
    summary_diag_cycle_type[metric] = (
        summary_diag_cycle_type[metric]
        / processed_cycler_run.diagnostic_summary[metric].iloc[0]
    )
    summary_diag_cycle_type.columns = ["cycle_index", "fractional_metric"]
    return summary_diag_cycle_type