def METHOD_NAME(cls, obj: Any) -> bytes:
    """Serialize data into MsgPack-encoded bytes.
    Args:
        obj: Data that needs encoding.
    Returns:
        MsgPack-encoded bytes that contains the input data.
    """
    return msgpack.packb(obj, default=cls._default, strict_types=True)