def _decode_parts_helper(
    response: "PipelineTransportHttpResponseBase",
    message: Message,
    http_response_type: Type["PipelineTransportHttpResponseBase"],
    requests: Sequence["PipelineTransportHttpRequest"],
    deserialize_response: Callable,
) -> List["PipelineTransportHttpResponse"]:
    """Helper for _decode_parts.

    Rebuild an HTTP response from pure string.

    :param response: The response to decode
    :type response: ~azure.core.pipeline.transport.HttpResponse
    :param message: The message to decode
    :type message: ~email.message.Message
    :param http_response_type: The type of response to return
    :type http_response_type: ~azure.core.pipeline.transport.HttpResponse
    :param requests: The requests that were batched together
    :type requests: list[~azure.core.pipeline.transport.HttpRequest]
    :param deserialize_response: The function to deserialize the response
    :type deserialize_response: callable
    :rtype: list[~azure.core.pipeline.transport.HttpResponse]
    :return: The list of responses
    """
    responses = []
    for index, raw_response in enumerate(message.get_payload()):
        content_type = raw_response.get_content_type()
        if content_type == "application/http":
            try:
                matching_request = requests[index]
            except IndexError:
                # If we have no matching request, this could mean that we had an empty batch.
                # The request object is only needed to get the HTTP METHOD and to store in the response object,
                # so let's just use the parent request so allow the rest of the deserialization to continue.
                matching_request = response.request
            responses.append(
                deserialize_response(
                    raw_response.get_payload(decode=True),
                    matching_request,
                    http_response_type=http_response_type,
                )
            )
        elif content_type == "multipart/mixed" and requests[index].multipart_mixed_info:
            # The message batch contains one or more change sets
            changeset_requests = requests[index].multipart_mixed_info[0]  # type: ignore
            changeset_responses = response._decode_parts(  # pylint: disable=protected-access
                raw_response, http_response_type, changeset_requests
            )
            responses.extend(changeset_responses)
        else:
            raise ValueError("Multipart doesn't support part other than application/http for now")
    return responses
Helper for _decode_parts.

    Rebuild an HTTP response from pure string.

    :param response: The response to decode
    :type response: ~azure.core.pipeline.transport.HttpResponse
    :param message: The message to decode
    :type message: ~email.message.Message
    :param http_response_type: The type of response to return
    :type http_response_type: ~azure.core.pipeline.transport.HttpResponse
    :param requests: The requests that were batched together
    :type requests: list[~azure.core.pipeline.transport.HttpRequest]
    :param deserialize_response: The function to deserialize the response
    :type deserialize_response: callable
    :rtype: list[~azure.core.pipeline.transport.HttpResponse]
    :return: The list of responses
    
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/azure/core/utils/_pipeline_transport_rest_shared.py