from typing import Any
from typing import Union
from typing import Dict


def get_simple_response_from_raw(raw_response: Any) -> Union[Any, Dict]:
    """
    Gets the simple response from a given JSON dict structure returned by Qualys service
    If object is not a dict, returns the response as is.
    Args:
        raw_response (Any): Raw response from Qualys service.

    Returns:
        (Union[Any, Dict]): Simple response path if object is a dict, else response as is.
    """
    simple_response = None
    if raw_response and isinstance(raw_response, dict):
        simple_response = raw_response.get('SIMPLE_RETURN', {}).get('RESPONSE', {})
    return simple_response