def find_points_of_interest(geotag, location):
 area_found = False
 area = ''
 min_dist = None
 near_bart = False
 bart_dist = 'N/A'
 bart = ''
 for (a, coords) in settings.BOXES.items():
  if in_box(geotag, coords):
   area = a
   area_found = True
 for (station, coords) in settings.TRANSIT_STATIONS.items():
  dist = coord_distance(coords[0], coords[1], geotag[0], geotag[1])
  if (((min_dist is None) or (dist < min_dist)) and (dist < settings.MAX_TRANSIT_DIST)):
   bart = station
   near_bart = True
  if ((min_dist is None) or (dist < min_dist)):
   bart_dist = dist
 if (len(area) == 0):
  for hood in settings.NEIGHBORHOODS:
   if (hood in location.lower()):
    area = hood
 return {'area_found': area_found, 'area': area, 'near_bart': near_bart, 'bart_dist': bart_dist, 'bart': bart}

def find_points_of_interest ( geotag , location ) : area_found = False area = '' min_dist = None near_bart = False bart_dist = 'N/A' bart = '' for ( a , coords ) in settings . BOXES . items ( ) : if in_box ( geotag , coords ) : area = a area_found = True for ( station , coords ) in settings . TRANSIT_STATIONS . items ( ) : dist = coord_distance ( coords [ 0 ] , coords [ 1 ] , geotag [ 0 ] , geotag [ 1 ] ) if ( ( ( min_dist is None ) or ( dist < min_dist ) ) and ( dist < settings . MAX_TRANSIT_DIST ) ) : bart = station near_bart = True if ( ( min_dist is None ) or ( dist < min_dist ) ) : bart_dist = dist if ( len ( area ) == 0 ) : for hood in settings . NEIGHBORHOODS : if ( hood in location . lower ( ) ) : area = hood return { 'area_found' : area_found , 'area' : area , 'near_bart' : near_bart , 'bart_dist' : bart_dist , 'bart' : bart }
find points of interest .