def _get_raw_parts_helper(response, http_response_type: Type):
    """Helper for _get_raw_parts

    Assuming this body is multipart, return the iterator or parts.

    If parts are application/http use http_response_type or HttpClientTransportResponse
    as envelope.

    :param response: The response to decode
    :type response: ~azure.core.pipeline.transport.HttpResponse
    :param http_response_type: The type of response to return
    :type http_response_type: any
    :rtype: iterator[~azure.core.pipeline.transport.HttpResponse]
    :return: The parts of the response
    """
    body_as_bytes = response.body()
    # In order to use email.message parser, I need full HTTP bytes. Faking something to make the parser happy
    http_body = b"Content-Type: " + response.content_type.encode("ascii") + b"\r\n\r\n" + body_as_bytes
    message: Message = message_parser(http_body)
    requests = response.request.multipart_mixed_info[0]
    return response._decode_parts(message, http_response_type, requests)  # pylint: disable=protected-access
Helper for _get_raw_parts

    Assuming this body is multipart, return the iterator or parts.

    If parts are application/http use http_response_type or HttpClientTransportResponse
    as envelope.

    :param response: The response to decode
    :type response: ~azure.core.pipeline.transport.HttpResponse
    :param http_response_type: The type of response to return
    :type http_response_type: any
    :rtype: iterator[~azure.core.pipeline.transport.HttpResponse]
    :return: The parts of the response
    
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/azure/core/utils/_pipeline_transport_rest_shared.py