def get_data(city: Optional[str]) -> Dict[str, Any]:
    """
    Use the Yahoo weather API to get weather information
    """
    req = urllib.request.Request(get_url(city))
    with urllib.request.urlopen(req) as f:
        response = f.read()
    answer = response.decode('ascii')
    data = json.loads(answer)
    r = data['query']['results']['channel']  # Remove some useless nesting
    return r
Use the Yahoo weather API to get weather information