code: def location_check(lat, lon):
          
          if not (isinstance(lat, number_types) and -90 <= lat <= 90):
              raise ValueError("Latitude: '{latitude}' invalid".format(latitude=lat))
  
          if not (isinstance(lon, number_types) and -180 <= lon <= 180):
              raise ValueError("Longitude: '{longitude}' invalid".format(longitude=lon))
docs: For use by Core client wrappers