code: def _get_template(querystring_key, mapping):
      
      default = None
      try:
          template_and_keys = mapping.items()
      except AttributeError:
          template_and_keys = mapping
      for template, key in template_and_keys:
          if key is None:
              key = PAGE_LABEL
              default = template
          if key == querystring_key:
              return template
      return default
docs: Return the template corresponding to the given ``querystring_key``.