def closer_city(lat, lon, city1, city2):
    "\n    Returns the name of either city1 or city2, whichever is closest to\n    coordinate (lat, lon).\n\n    >>> berkeley = make_city('Berkeley', 37.87, 112.26)\n    >>> stanford = make_city('Stanford', 34.05, 118.25)\n    >>> closer_city(38.33, 121.44, berkeley, stanford)\n    'Stanford'\n    >>> bucharest = make_city('Bucharest', 44.43, 26.10)\n    >>> vienna = make_city('Vienna', 48.20, 16.37)\n    >>> closer_city(41.29, 174.78, bucharest, vienna)\n    'Bucharest'\n    "
    tmp = make_city('tmp', lat, lon)
    dis1 = distance(city1, tmp)
    dis2 = distance(city2, tmp)
    if (dis1 > dis2):
        return get_name(city2)
    else:
        return get_name(city1)
Returns the name of either city1 or city2, whichever is closest to
coordinate (lat, lon).

>>> berkeley = make_city('Berkeley', 37.87, 112.26)
>>> stanford = make_city('Stanford', 34.05, 118.25)
>>> closer_city(38.33, 121.44, berkeley, stanford)
'Stanford'
>>> bucharest = make_city('Bucharest', 44.43, 26.10)
>>> vienna = make_city('Vienna', 48.20, 16.37)
>>> closer_city(41.29, 174.78, bucharest, vienna)
'Bucharest'
def closer_city(lat, lon, city1, city2):
    "\n    Returns the name of either city1 or city2, whichever is closest to\n    coordinate (lat, lon).\n\n    >>> berkeley = make_city('Berkeley', 37.87, 112.26)\n    >>> stanford = make_city('Stanford', 34.05, 118.25)\n    >>> closer_city(38.33, 121.44, berkeley, stanford)\n    'Stanford'\n    >>> bucharest = make_city('Bucharest', 44.43, 26.10)\n    >>> vienna = make_city('Vienna', 48.20, 16.37)\n    >>> closer_city(41.29, 174.78, bucharest, vienna)\n    'Bucharest'\n    "
    tmp = make_city('tmp', lat, lon)
    dis1 = distance(city1, tmp)
    dis2 = distance(city2, tmp)
    if (dis1 > dis2):
        return get_name(city2)
    else:
        return get_name(city1)