u"""
            Create an instance of ElasticDict() where all nested dict()'s are replaced to ElasticDict()
        :rtype: ElasticDict (if value is dict()), else type(value)

def create_from(value):
        u"""
            Create an instance of ElasticDict() where all nested dict()'s are replaced to ElasticDict()
        :rtype: ElasticDict (if value is dict()), else type(value)
        """
        def convert(val):
            if isinstance(val, tuple):
                return tuple(convert(v) for v in val)
            elif isinstance(val, list):
                return [convert(v) for v in val]
            elif isinstance(val, (dict, ElasticDict)):
                return ElasticDict({k: convert(v) for k, v in val.iteritems()})
            else:
                return val

        return convert(value)