def _parts_helper(
    response: "PipelineTransportHttpResponse",
) -> Iterator["PipelineTransportHttpResponse"]:
    """Assuming the content-type is multipart/mixed, will return the parts as an iterator.

    :param response: The response to decode
    :type response: ~azure.core.pipeline.transport.HttpResponse
    :rtype: iterator[HttpResponse]
    :return: The parts of the response
    :raises ValueError: If the content is not multipart/mixed
    """
    if not response.content_type or not response.content_type.startswith("multipart/mixed"):
        raise ValueError("You can't get parts if the response is not multipart/mixed")

    responses = response._get_raw_parts()  # pylint: disable=protected-access
    if response.request.multipart_mixed_info:
        policies: Sequence["SansIOHTTPPolicy"] = response.request.multipart_mixed_info[1]

        # Apply on_response concurrently to all requests
        import concurrent.futures

        def parse_responses(response):
            http_request = response.request
            context = PipelineContext(None)
            pipeline_request = PipelineRequest(http_request, context)
            pipeline_response = PipelineResponse(http_request, response, context=context)

            for policy in policies:
                _await_result(policy.on_response, pipeline_request, pipeline_response)

        with concurrent.futures.ThreadPoolExecutor() as executor:
            # List comprehension to raise exceptions if happened
            [  # pylint: disable=expression-not-assigned, unnecessary-comprehension
                _ for _ in executor.map(parse_responses, responses)
            ]

    return responses
Assuming the content-type is multipart/mixed, will return the parts as an iterator.

    :param response: The response to decode
    :type response: ~azure.core.pipeline.transport.HttpResponse
    :rtype: iterator[HttpResponse]
    :return: The parts of the response
    :raises ValueError: If the content is not multipart/mixed
    
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/azure/core/utils/_pipeline_transport_rest_shared.py