def decode_as_string(text, encoding=None):
    #text should be a byte string

    if encoding is None:
        encoding = _console_encoding

    if not isinstance(text, unicode):
        text = text.decode(encoding)

    text = unicodedata.normalize('NFC', text)

    return text
Get variables dictionary for rendering templates from metadata.
dataset/ETHPy150Open GeekTrainer/Flask/Work/Trivia - Module 5/env/Lib/site-packages/setuptools/svn_utils.py/decode_as_string--crossover with--dataset/ETHPy150Open openstack/compass-core/compass/deployment/installers/installer.py/BaseInstaller.get_tmpl_vars_from_metadata