call the function get_template_from_string with 3 arguments: source, origin and template_name, substitute the result for template.
template = get_template_from_string ( source , origin , template_name )