import re


def get_collection_name(path):
    """Gets the new corresponding collection name

    path is the old path to the dataset
    Returns what the collection is now called
    """
    # Matches raw collections (e.g. raw_qr, raw_obj_pit)
    if raw_pattern := re.fullmatch(r'raw\.(.*)', path):
        return 'raw_' + raw_pattern[1]
    # Matches calc collections (e.g. obj_tim, tba_team)
    if calc_processed_pattern := re.fullmatch(r'processed\.calc_(.+)', path):
        return calc_processed_pattern[1]
    # subj_aim and uncle tim doesn't match the above because old version did not begin with 'calc'
    if processed_pattern := re.fullmatch(r'processed\.(.+)', path):
        return processed_pattern[1]
    print(f'Could not convert {path} to new collection name using {path} instead')
    return path