code: def location_for(self, city_name):
          
          line = self._lookup_line_by_city_name(city_name)
          if line is None:
              return None
          tokens = line.split(",")
          return Location(tokens[0], float(tokens[3]), float(tokens[2]),
                          int(tokens[1]), tokens[4])
docs: Returns the *Location* object corresponding to the first city found
          that matches the provided city name. The lookup is case insensitive.
  
          :param city_name: the city name you want a *Location* for
          :type city_name: str
          :returns: a *Location* instance or ``None`` if the lookup fails
  
          .. deprecated:: 3.0.0
             Use :func:`locations_for` instead.