def dict2_to_tuplelist(d):
    """
    Converts a dictionary of dictionary items into a list of tuples
    """
    tuple_list = []
    data = []
    for k, v in d.items():
        for w, x in v.items():
            tuple_list.append((k, w))
            data.append(x)
    return tuple_list, data