code: def _increment_504_stat(self, request):
          '''
          Increments the 504 stat counters
  
          @param request: The scrapy request in the spider
          '''
          for key in self.stats_dict:
              if key == 'lifetime':
                  unique = request.url + str(time.time())
                  self.stats_dict[key].increment(unique)
              else:
                  self.stats_dict[key].increment()
          self.logger.debug("Incremented status_code '504' stats"f _increment_504_stat(self, request):
          '''
          Increments the 504 stat counters
  
          @param request: The scrapy request in the spider
          '''
          for key in self.stats_dict:
              if key == 'lifetime':
                  unique = request.url + str(time.time())
                  self.stats_dict[key].increment(unique)
              else:
                  self.stats_dict[key].increment()
          self.logger.debug("Incremented status_code '504' stats")
docs: Increments the 504 stat counters
  
          @param request: The scrapy request in the spider