@classmethod<EOL><INDENT>def load(cls, data, promote=False):<DEDENT>
t = type(data)<EOL>if t == cls:<EOL><INDENT>return cls({k: cls.load(v, promote)<EOL>for k, v in data.__dict__.items()})<EOL><DEDENT>elif isinstance(data, cls):<EOL><INDENT>return data.copy()<EOL><DEDENT>elif isinstance(data, Ent):<EOL><INDENT>if promote:<EOL><INDENT>return cls({k: cls.load(v, promote)<EOL>for k, v in data.__dict__.items()})<EOL><DEDENT>else:<EOL><INDENT>return data.copy()<EOL><DEDENT><DEDENT>elif t not in SAFE_TYPES:<EOL><INDENT>return None<EOL><DEDENT>elif t in (tuple, list, set):<EOL><INDENT>return t(cls.load(i) for i in data)<EOL><DEDENT>elif t == dict:<EOL><INDENT>return cls({k: cls.load(v) for k, v in data.items()})<EOL><DEDENT>else:<EOL><INDENT>return data<EOL><DEDENT>
Create a new ent from an existing value.  The value must either
        be an instance of Ent, or must be an instance of SAFE_TYPES.  If
        the value is a base type (bool, int, string, etc), it will just be
        returned.  Iterable types will be loaded recursively, transforming
        dictionaries into Ent instances, but otherwise maintaining the
        hierarchy of the input data.