def get_label_number(window):
    """This method assigns to each label of a window a number."""
    mode_list = ["bike", "car", "walk", "bus", "train"]
    current_label_number = 0

    for mode in enumerate(mode_list):
        if window[1] == mode[1]:
            current_label_number = mode[0]

    return current_label_number