def METHOD_NAME(payload, use_bytes, expected):
    inference_response = HuggingfaceRequestCodec.encode_response(
        model_name=expected.model_name, payload=payload, use_bytes=use_bytes
    )
    assert inference_response == expected