<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def url(self):
 # type:() -> str """ Build and returns a URL used to make a Dark Sky API call. """

        url = "https://api.darksky.net/forecast/{key}/{lat},{lon}".format(key=self.api_key,
                                                                          lat=self.latitude,
                                                                          lon=self.longitude)

        if isinstance(self._date, datetime):
            url += ",{:%Y-%m-%dT%H:%M:%S}".format(self._date)

        url += "?units={}".format(self.units)

        if self.lang != "auto":
            url += "&lang={}".format(self.lang)

        if len(self._exclude) > 0:
            url += "&exclude="
            for e in self._exclude:
                url += "{},".format(e)
            url = url.strip(",")

        if self._extend:
            url += "&extend=hourly"

        return url