code: def re_keys(self, pattern):
          
          if not pattern.endswith("$"):
              pattern += "$"
          expr = re.compile(pattern)
          return list(filter(expr.match, self.keys()))
docs: Find keys matching `pattern`.
  
          :param pattern: Regular expression
          :return: Matching keys or empty list
          :rtype: list