# Path: auxlib/compat.py
# def isiterable(obj):


from functools import reduce
from collections import Mapping, Set
from .compat import isiterable, iteritems, odict, text_type
# -*- coding: utf-8 -*-
"""Common collection classes."""
from __future__ import print_function, division, absolute_import



def make_immutable(value):
    # this function is recursive, and if nested data structures fold back on themselves,
    #   there will likely be recursion errors
    if isinstance(value, Mapping):
        if isinstance(value, frozenodict):
            return value
        return frozenodict((k, make_immutable(v)) for k, v in iteritems(value))
    elif isinstance(value, Set):
        if isinstance(value, frozenset):
            return value
        return frozenset(make_immutable(v) for v in value)

# Path: auxlib/compat.py
# def isiterable(obj):


# Path: auxlib/collection.py
from functools import reduce
from collections import Mapping, Set
from .compat import isiterable, iteritems, odict, text_type

# -*- coding: utf-8 -*-
"""Common collection classes."""
from __future__ import print_function, division, absolute_import



def make_immutable(value):
    # this function is recursive, and if nested data structures fold back on themselves,
    #   there will likely be recursion errors
    if isinstance(value, Mapping):
        if isinstance(value, frozenodict):
            return value
        return frozenodict((k, make_immutable(v)) for k, v in iteritems(value))
    elif isinstance(value, Set):
        if isinstance(value, frozenset):
            return value
        return frozenset(make_immutable(v) for v in value)

    elif isiterable(value):