code: def _validate_place_types(self, types):
          
          for pt in types:
              if pt not in self.place_types:
                  raise InvalidPlaceTypeError(pt)
          return {'types': ",".join(types)}
docs: Validate place types and return a mapping for use in requests.