def METHOD_NAME(self, obj):
    if isinstance(obj, enum.Enum):
        return obj.name
    elif isinstance(obj, datetime):
        return obj.isoformat()
    elif isinstance(obj, timedelta):
        return round(obj.total_seconds())
    elif isinstance(obj, UUID):
        return str(obj)
    elif isinstance(obj, StrictVersion):
        return str(obj)
    elif isinstance(obj, set):
        return list(obj)
    elif isinstance(obj, Decimal):
        return float(obj)
    elif isinstance(obj, Dumpeable):
        return obj.dump()
    elif isinstance(obj, ipaddress._BaseAddress):
        return str(obj)
    # Instead of failing, return the string representation by default
    return str(obj)