from typing import List
from typing import Dict
from typing import Any
import copy


def create_lookup_table(
    list_of_dicts: List[Dict[str, Any]], lookup_key
) -> Dict[str, List[Any]]:
    """ Takes a list of dictionaries and converts it into a dictionary of dictionaries indexed by a specified key"""

    payload = {}
    for dict_item in list_of_dicts:
        payload_index = dict_item[lookup_key]
        dict_item = copy.deepcopy(dict_item)
        dict_item.pop(lookup_key)
        payload[payload_index] = dict_item
    return payload