def deserialize_from_http_generics(
        cls,
        response: HTTPResponseType,
        encoding: Optional[str] = None,
    ) -> Any:
        """Deserialize from HTTP response.

        Headers will tested for "content-type"

        :param response: The HTTP response
        :type response: any
        :param str encoding: The encoding to use if known for this service (will disable auto-detection)
        :raises ~azure.core.exceptions.DecodeError: If deserialization fails
        :returns: A dict (JSON), XML tree or str, depending of the mime_type
        :rtype: dict[str, Any] or xml.etree.ElementTree.Element or str
        """
        # Try to use content-type from headers if available
        if response.content_type:
            mime_type = response.content_type.split(";")[0].strip().lower()
        # Ouch, this server did not declare what it sent...
        # Let's guess it's JSON...
        # Also, since Autorest was considering that an empty body was a valid JSON,
        # need that test as well....
        else:
            mime_type = "application/json"

        # Rely on transport implementation to give me "text()" decoded correctly
        if hasattr(response, "read"):
            # since users can call deserialize_from_http_generics by themselves
            # we want to make sure our new responses are read before we try to
            # deserialize. Only read sync responses since we're in a sync function
            #
            # Technically HttpResponse do not contain a "read()", but we don't know what
            # people have been able to pass here, so keep this code for safety,
            # even if it's likely dead code
            if not inspect.iscoroutinefunction(response.read):  # type: ignore
                response.read()  # type: ignore
        return cls.deserialize_from_text(response.text(encoding), mime_type, response=response)
Deserialize from HTTP response.

        Headers will tested for "content-type"

        :param response: The HTTP response
        :type response: any
        :param str encoding: The encoding to use if known for this service (will disable auto-detection)
        :raises ~azure.core.exceptions.DecodeError: If deserialization fails
        :returns: A dict (JSON), XML tree or str, depending of the mime_type
        :rtype: dict[str, Any] or xml.etree.ElementTree.Element or str
        
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/azure/core/pipeline/policies/_universal.py