u"""
            Exports self as ordinary dict(), replacing recursively all instances of ElasticDict() to dict()
        :rtype: dict()

def get_as_dict(self):
        u"""
            Exports self as ordinary dict(), replacing recursively all instances of ElasticDict() to dict()
        :rtype: dict()
        """
        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 {k: convert(v) for k, v in val.iteritems()}
            else:
                return val

        return convert(self.__dict__)