def _init_url_mappings(self, handler_tuples):

    handler_map = {}
    pattern_map = {}
    url_mapping = []

    for regexp, handler in handler_tuples:

      handler_map[handler.__name__] = handler

      if not regexp.startswith('^'):
        regexp = '^' + regexp
      if not regexp.endswith('$'):
        regexp += '$'

      compiled = re.compile(regexp)
      url_mapping.append((compiled, handler))

      num_groups = len(RE_FIND_GROUPS.findall(regexp))
      handler_patterns = pattern_map.setdefault(handler, [])
      handler_patterns.append((compiled, num_groups))

    self._handler_map = handler_map
    self._pattern_map = pattern_map
    self._url_mapping = url_mapping
Initializes the maps needed for mapping urls to handlers and handlers
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/ext/webapp/__init__.py/WSGIApplication._init_url_mappings