code: def unfold_matching(self, querystring, focus_first=True):
          
          first = None
          for MT in self.messagetrees():
              msg = MT._message
              if msg.matches(querystring):
                  MT.expand(MT.root)
                  if first is None:
                      first = (self._tree.position_of_messagetree(MT), MT.root)
                      self.body.set_focus(first)
              else:
                  MT.collapse(MT.root)
          self.body.refresh()
docs: expand all messages that match a given querystring.
  
          :param querystring: query to match
          :type querystring: str
          :param focus_first: set the focus to the first matching message
          :type focus_first: bool