<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

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")