'Returns a unique sequence number (unique across threads)'

def _get_new_seqnr(self):

    self.seqnr_lock.acquire()
    self.last_seqnr += 1
    self.seqnr_lock.release()
    return str(self.last_seqnr)
