def METHOD_NAME(o):
    if isinstance(o, datetime):
        return o.timestamp()
    if isinstance(o, set):
        return list(o)
    if isinstance(o, LazyString):
        return str(o)
    logger.warning(
        f"robust_json_dumps could not convert {o} of type {type(o)}.  Converting to string instead."
    )
    return str(o)