def METHOD_NAME(obj):
    if type(obj) == DateTime:
        return obj.ISO8601()
    if type(obj) == PersistentList:
        return list(obj)
    if type(obj) == PersistentDict:
        return dict(obj)
    if type(obj) == OOBTree:
        return dict(obj)
    raise TypeError(
        "Unserializable object {} of type {}".format(obj, type(obj)))