<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_matching(self, ref_name: str, filter_: str) \ -> Iterable[ListEntry]: """Return all the entries in the list tree that match the given query. Args: ref_name: Mailbox reference name. filter_: Mailbox name with possible wildcards. """

        canonical, canonical_i = self._get_pattern(ref_name + filter_)
        for entry in self.list():
            if entry.name == 'INBOX':
                if canonical_i.match('INBOX'):
                    yield entry
            elif canonical.match(entry.name):
                yield entry