code: def _graphite_url(self, query, raw_data=False, graphite_url=None):
          
          query = escape.url_escape(query)
          graphite_url = graphite_url or self.reactor.options.get('public_graphite_url')
  
          url = "{base}/render/?target={query}&from=-{from_time}&until=-{until}".format(
              base=graphite_url, query=query,
              from_time=self.from_time.as_graphite(),
              until=self.until.as_graphite(),
          )
          if raw_data:
              url = "{}&format=raw".format(url)
          return url
docs: Build Graphite URL.