def sequences_to_dictionary(sequence, index):
    """ Converts a sequence of sequences to a dictionary, where the dictionary key is the entry at
    index in the subsequence, i.e. if index = 1 then:
    [[1, "45"], [2, "46"]]
    becomes
    {
        "45": [1, "45"],
        "46": [2, "46"]
    }
    
    Args:
        sequence: Sequence of sequences.
        index: Index in the subsequence to use as the key in the dictionary.

    Returns:
        The dictionary.
    """
    return {
        sequence[i][index]: sequence[i] for i in range(len(sequence))
    }