def METHOD_NAME(payload, use_bytes, expected):
    inference_request = HuggingfaceRequestCodec.encode_request(
        payload=payload, use_bytes=use_bytes
    )
    assert inference_request == expected