def recreate_classes(self, literal):
    t = type(literal)
    if (t is set):
        return {self.recreate_classes(x) for x in literal}
    if (t is list):
        return [self.recreate_classes(x) for x in literal]
    if (t is tuple):
        return tuple((self.recreate_classes(x) for x in literal))
    if (t is dict):
        if ('__class__' in literal):
            return self.dict_to_class(literal)
        result = {}
        for (key, value) in literal.items():
            result[key] = self.recreate_classes(value)
        return result
    return literal
def recreate_classes(self, literal):
    t = type(literal)
    if (t is set):
        return {self.recreate_classes(x) for x in literal}
    if (t is list):
        return [self.recreate_classes(x) for x in literal]
    if (t is tuple):
        return tuple((self.recreate_classes(x) for x in literal))
    if (t is dict):
        if ('__class__' in literal):
            return self.dict_to_class(literal)
        result = {}
        for (key, value) in literal.items():
            result[key] = self.recreate_classes(value)
        return result
    return literal