def default_converter(o):
    """Implement this function such that it returns
    a serializable object for ``o`` or raises a ``TypeError``.

    For example, to support arbitrary iterators, you could
    implement default like this::

        def default(o):
            try:
                iterable = iter(o)
            except TypeError:
                pass
            else:
                return list(iterable)
            raise TypeError(repr(o) + " is not JSON serializable")

    """
    raise TypeError(repr(o) + ' is not PBJSON serializable')
