code: def flush(self):
          
          local_sender = self.sender
          if not local_sender:
              return
          while True:
              # get at most send_buffer_size items and send them
              data = []
              while len(data) < local_sender.send_buffer_size:
                  item = self.get()
                  if not item:
                      break
                  data.append(item)
              if len(data) == 0:
                  break
              local_sender.send(data)
docs: Flushes the current queue by by calling :func:`sender`'s :func:`send` method.