code: def clear_queues(self, manager):
          
          for queue in (self.to_q, self.from_q):
              if queue is None:
                  continue
              # If we got no manager, we directly call the clean
              if not manager:
                  try:
                      queue.close()
                      queue.join_thread()
                  except AttributeError:
                      pass
              # else:
              #    q._callmethod('close')
              #    q._callmethod('join_thread')
          self.to_q = self.from_q = None
docs: Release the resources associated to the queues of this instance
  
          :param manager: Manager() object
          :type manager: None | object
          :return: None