def process_request(req):
    """Process the request.

        Return a `(template_name, data)` pair, where `data` is a
        dictionary of substitutions for the Jinja2 template (the
        template context, in Jinja2 terms).

        Optionally, the return value can also be a `(template_name,
        data, metadata)` triple, where `metadata` is a `dict` with
        hints for the template engine or the web front-end.

        Keys supported are:

          - `'content_type'`: the mimetype used for content delivery;
            "text/html" is assumed if the key is not present or the
            `metadata` was not specified

          - `'text'`: a boolean value indicating whether the Jinja2
            auto-escaping feature should be deactivated
            (``text=True``) or not (``text=False``); defaults to
            ``False``, suitable for generating HTML or XML content

          - `'fragment'`: a boolean value indicating whether the
            generated content will be used as part of another page
            (``fragment=True``) or as a stand-alone page
            (``fragment=False``), the default

          - `'domain'`: a string value indicating the translation
            domain to which the translated strings in the template
            belong to

        Note that if template processing should not occur, this method
        can simply send the response itself (see `Request` methods)
        and not return anything, as the `Request` methods raise a
        `RequestDone` exception.

        :Since 1.0: Clearsilver templates are no longer supported.

        :Since 1.1.2: the rendering `method` (xml, xhtml or text) may be
           returned as a fourth parameter in the tuple, but if not specified
           it will be inferred from the `content_type` when rendering the
           template.

        :Since 1.3.2: returns a pair, or a tuple in which the third
           element is a `dict` instead of a string like in the old
           API.  Note that the old API (`(template, data,
           content_type)` where `content_type` is a string or `None`)
           is still supported. When used, this means that `template`
           is a legacy Genshi template. This support for the old API
           will be removed in Trac 1.5.1, in which `metadata` will
           always be a `dict` or `None` when specified.

        """
