@staticmethod
def extract_observation_value(observation, value):
    """Returns observation or observation value."""
    obs_value = observation.get(value)
    if obs_value is None:
        return None
    if isinstance(observation[value], dict):
        obs_sub_value = observation[value].get('value')
        if obs_sub_value is None:
            return None
        return float(obs_sub_value)
    return observation[value]
