docs: def create_dispatcher(self):
          """
          Return a dispatcher for configured channels.
          """
          before_context = max(self.args.before_context, self.args.context)
          after_context = max(self.args.after_context, self.args.context)
  
          if self.args.files_with_match is not None or self.args.count or self.args.only_matching or self.args.quiet:
              # Sending of log lines disabled by arguments
              return UnbufferedDispatcher(self._channels)
          elif before_context == 0 and after_context == 0:
              # Don't need line buffering
              return UnbufferedDispatcher(self._channels)
          elif self.args.thread:
              return ThreadedDispatcher(self._channels, before_context, after_context)
          else:
              return LineBufferDispatcher(self._channels, before_context, after_context)