def _parse_list_response(response, outer_key, inner_key):
    """Responses from the niaopendata service aren't entirely consistent across
    the board, so we can't rely on a single consistent format even for a single
    endpoint. This function checks and can parse all known return formats into
    simple lists suitable for returning to callers.
    """
    outer = response.get(outer_key)
    if outer is None:
        return []
    inner = outer[inner_key]
    if isinstance(inner, dict):
        return [inner]
    return inner
