code: def add_monitor(self, pattern, callback, limit=80):
          
          self.buffer.add_monitor(pattern, partial(callback, self), limit)
docs: Calls the given function whenever the given pattern matches the
          incoming data.
  
          .. HINT::
              If you want to catch all incoming data regardless of a
              pattern, use the Protocol.data_received_event event instead.
  
          Arguments passed to the callback are the protocol instance, the
          index of the match, and the match object of the regular expression.
  
          :type  pattern: str|re.RegexObject|list(str|re.RegexObject)
          :param pattern: One or more regular expressions.
          :type  callback: callable
          :param callback: The function that is called.
          :type  limit: int
          :param limit: The maximum size of the tail of the buffer
                        that is searched, in number of bytes.