improve _get_ancestors_observation function