def sla_total_counts_df(input_df):
    """Group the data based on dagid and taskid and calculate its count

    Args:
        input_df (dataframe): base SLA run table

    Returns:
        Dataframe containing the total count of SLA grouped by dag_id and task_id
    """
    df = (input_df.groupby(["dag_id",
                            "task_id"]).size().to_frame(name="total_count").sort_values("total_count",
                                                                                        ascending=False).reset_index())
    return df
Group the data based on dagid and taskid and calculate its count

    Args:
        input_df (dataframe): base SLA run table

    Returns:
        Dataframe containing the total count of SLA grouped by dag_id and task_id
    
sla-miss-report/airflow-sla-miss-report.py