def places_nearby(client, location, radius=None, keyword=None, language=None, min_price=None, max_price=None, name=None, open_now=False, rank_by=None, type=None, page_token=None):
 if (rank_by == 'distance'):
  if (not (keyword or name or type)):
   raise ValueError('either a keyword, name, or type arg is required when rank_by is set to distance')
  elif (radius is not None):
   raise ValueError('radius cannot be specified when rank_by is set to distance')
 return _places(client, 'nearby', location=location, radius=radius, keyword=keyword, language=language, min_price=min_price, max_price=max_price, name=name, open_now=open_now, rank_by=rank_by, type=type, page_token=page_token)

def places_nearby ( client , location , radius = None , keyword = None , language = None , min_price = None , max_price = None , name = None , open_now = False , rank_by = None , type = None , page_token = None ) : if ( rank_by == 'distance' ) : if ( not ( keyword or name or type ) ) : raise ValueError ( 'either a keyword, name, or type arg is required when rank_by is set to distance' ) elif ( radius is not None ) : raise ValueError ( 'radius cannot be specified when rank_by is set to distance' ) return _places ( client , 'nearby' , location = location , radius = radius , keyword = keyword , language = language , min_price = min_price , max_price = max_price , name = name , open_now = open_now , rank_by = rank_by , type = type , page_token = page_token )
performs nearby search for places .