code: def _validated_locations(self, locations):
          
          # The set difference between the given locations and the available locations
          # will be the set of invalid locations
          valid_locations = set(self.__location_map__.keys())
          given = set(locations)
          invalid_locations = given - valid_locations
          if len(invalid_locations):
              msg = "Invalid locations arguments: {0}".format(list(invalid_locations))
              raise ValueError(msg)
          return locations
docs: Ensure that the given locations argument is valid.
  
          :raises: ValueError if a given locations includes an invalid location.