def glue_template_and_params(template_and_params):
    """Return wiki text of template glued from params.

    You can use items from extract_templates_and_params here to get
    an equivalent template wiki text (it may happen that the order
    of the params changes).
    """
    template, params = template_and_params
    text = ''
    for item in params:
        text += '|%s=%s\n' % (item, params[item])
    return '{{%s\n%s}}' % (template, text)
