'Creates a tuple list from a dict with a tuple/value pair for every value that is a list'

def flatten(self):

    flat = []
    for (key, value) in self.__dict__.items():
        if isinstance(value, list):
            for v in value:
                flat.append((key, v))
        else:
            flat.append((key, value))
    return flat
