<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_string(source, args=None):
 """Renders a template string"""

    if _has_jinja:
        logger.info('Precompiling model with arguments: {}'.format(args))
        return _jenv.from_string(source).render(args or {})
    if args:
        raise RuntimeError(_except_text)
    return source