'Handles the response from the UDP scraper.
:param response: The response from the UDP scraper'

def handle_response(self, response):

    if self._is_failed:
        return
    if (len(response) < 8):
        self._logger.info(u'%s    Invalid    response    for    UDP    SCRAPE:    %s', self, repr(response))
        self.failed('invalid    message    size')
        return
    (action, transaction_id) = struct.unpack_from('!ii', response, 0)
    if ((action != self._action) or (transaction_id != self._transaction_id)):
        errmsg_length = (len(response) - 8)
        error_message = struct.unpack_from((('!' + str(errmsg_length)) + 's'), response, 8)
        self._logger.info(u'%s    Error    response    for    UDP    SCRAPE:    [%s]    [%s]', self, repr(response), repr(error_message))
        self.failed(msg=''.join(error_message))
        return
    if ((len(response) - 8) != (len(self._infohash_list) * 12)):
        self._logger.info(u'%s    UDP    SCRAPE    response    mismatch:    %s', self, len(response))
        self.failed(msg='invalid    response    size')
        return
    offset = 8
    response_list = []
    for infohash in self._infohash_list:
        (complete, _downloaded, incomplete) = struct.unpack_from('!iii', response, offset)
        offset += 12
        response_list.append({'infohash': infohash.encode('hex'), 'seeders': complete, 'leechers': incomplete})
    UdpTrackerSession.remove_transaction_id(self)
    self._is_finished = True
    self.scraper.stop()
    self.scraper = None
    self.result_deferred.callback({self.tracker_url: response_list})
