code: def match(self, uri):
          ''' Matches an URL and returns a (handler, target) tuple '''
          if uri in self.static:
              return self.static[uri], {}
          for combined, subroutes in self.dynamic:
              match = combined.match(uri)
              if not match: continue
              target, groups = subroutes[match.lastindex - 1]
              groups = groups.match(uri).groupdict() if groups else {}
              return target, groups
          return None, {f match(self, uri):
          ''' Matches an URL and returns a (handler, target) tuple '''
          if uri in self.static:
              return self.static[uri], {}
          for combined, subroutes in self.dynamic:
              match = combined.match(uri)
              if not match: continue
              target, groups = subroutes[match.lastindex - 1]
              groups = groups.match(uri).groupdict() if groups else {}
              return target, groups
          return None, {}
docs: Matches an URL and returns a (handler, target) tuple