def set_initial_status(
        self, pipeline_response: PipelineResponse[HttpRequestTypeVar, AllHttpResponseTypeVar]
    ) -> str:
        """Process first response after initiating long running operation.

        :param pipeline_response: Initial REST call response.
        :type pipeline_response: ~azure.core.pipeline.PipelineResponse
        :return: The initial status.
        :rtype: str
        """
        self._request = pipeline_response.http_response.request
        response = pipeline_response.http_response

        self._set_async_url_if_present(response)

        if response.status_code in {200, 201, 202, 204} and self._async_url:
            # Check if we can extract status from initial response, if present
            try:
                return self.get_status(pipeline_response)
            # Wide catch, it may not even be JSON at all, deserialization is lenient
            except Exception:  # pylint: disable=broad-except
                pass
            return "InProgress"
        raise OperationFailed("Operation failed or canceled")
Process first response after initiating long running operation.

        :param pipeline_response: Initial REST call response.
        :type pipeline_response: ~azure.core.pipeline.PipelineResponse
        :return: The initial status.
        :rtype: str
        
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/azure/core/polling/base_polling.py