def METHOD_NAME(obj: Serialized | Serialize) -> list:
    if isinstance(obj, Serialized):
        sub_header, sub_frames = obj.header, obj.frames
    else:
        sub_header, sub_frames = serialize_and_split(
            obj,
            serializers=serializers,
            on_error=on_error,
            context=context,
            size=frame_split_size,
        )
        _inplace_compress_frames(sub_header, sub_frames)
    sub_header["num-sub-frames"] = len(sub_frames)
    sub_header = msgpack.dumps(
        sub_header, default=msgpack_encode_default, use_bin_type=True
    )
    return [sub_header] + sub_frames