Incorrect documentation on the sequencing of function outputs for parallel function calling

In the documentation https://platform.openai.com/docs/guides/function-calling/configuring-parallel-function-calling, it states that if the model return a response with more than one function call, you should return the function outputs in the following order

[
... # previous message dicts
*function_call_dicts,
*function_output_dicts,
]

However, if you do this, you get the error

openai.BadRequestError: Error code: 400 - {'error': {'message': "An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'. The following tool_call_ids did not have response messages: call_MincAp1ra5PXK9rXdejtTOrt", 'type': 'invalid_request_error', 'param': 'messages.[4].role', 'code': None}}

Instead, if you return the function outputs in this way

[
... # previous message dicts
function_call_dicts[0],
function_output_dicts[0],
function_call_dicts[1],
function_output_dicts[1],
function_call_dicts[2],
function_output_dicts[2],
...
]

then there is no error and everything works fine. So either the documentation is wrong or I am doing something wrong. please let me know!