def _match(self, pattern, string):
        """Same as :func:`re.match`, except the regex is compiled and cached,
        then reused on subsequent matches with the same pattern."""
        try:
            compiled = self._compiled[pattern]
        except __HOLE__:
            compiled = self._compiled[pattern] = re.compile(pattern, re.U)
        return compiled.match(string)
dataset/ETHPy150Open celery/kombu/kombu/transport/virtual/exchange.py/TopicExchange._match