docs: def generate_adapter(adapter, name='url_for', map_name='url_map'):
      """Generates the url building function for a map."""
      values = {
          u'server_name':     dumps(adapter.server_name),
          u'script_name':     dumps(adapter.script_name),
          u'subdomain':       dumps(adapter.subdomain),
          u'url_scheme':      dumps(adapter.url_scheme),
          u'name':            name,
          u'map_name':        map_name
      }
      return u'''\
  var %(name)s = %(map_name)s(
      %(server_name)s,
      %(script_name)s,
      %(subdomain)s,
      %(url_scheme)s
  );''' % values