def get_max_ttr(df_max):
    """Returns maximum ttr calculated per TMC.
    Args: df_max, a pandas dataframe.
    Returns: df_max, a dataframe containing grouped TMCs with max tttr values. 
    """
    ttr_operations = ({'tttr': 'max'})
    df_max = df_max.groupby('tmc_code', as_index=False).agg(ttr_operations)
    
    return df_max