def entity_list(raw_entities_dict):
    """
    Returns a list of tuples that preserves the qbbo_types and Id keys.
    
    (The input is what you get when you run quickbooks.transactions()
     or quickbooks.names())

    Each item in list is a three-item tuple:
    (qbbo_type,Id,raw_entity_dict)
    """
    e_list = []

    for qbbo in raw_entities_dict:

        for Id in raw_entities_dict[qbbo]:
            
            raw_QBBO_dict = raw_entities_dict[qbbo][Id]

            e_list.append((qbbo, Id, raw_QBBO_dict))

    return e_list