def reconstruct_token(token):
    """Given a token, reconstruct the original text."""
    # TOKEN_TEXT = 0
    # TOKEN_VAR = 1
    # TOKEN_BLOCK = 2
    # TOKEN_COMMENT = 3
    formats = ['%s', '{{%s}}', '{%% %s %%}', '{# %s #}']
    return formats[token.token_type] % token.contents