def template_field_role(app, typ, rawtext, text, lineno, inliner, options={}, content=[]):
text = utils.unescape(text)<EOL>try:<EOL><INDENT>template_fields = get_template_field(app.env, text)<EOL><DEDENT>except RoleException as e:<EOL><INDENT>msg = inliner.reporter.error("<STR_LIT>" % (text, e, ), line=lineno)<EOL>prb = inliner.problematic(rawtext, rawtext, msg)<EOL>return [prb], [msg]<EOL><DEDENT>node = nodes.inline(rawtext=rawtext)<EOL>for i, field in enumerate(template_fields):<EOL><INDENT>if i != <NUM_LIT:0>:<EOL><INDENT>node += nodes.Text("<STR_LIT:U+002CU+0020>")<EOL><DEDENT>node += nodes.literal(field, "<STR_LIT>", nodes.Text(field))<EOL><DEDENT>return [node], []<EOL>
A role that allows you to include a list of template fields in the middle of the text. This is especially
useful when writing guides describing how to use the operator.
The result is a list of fields where each field is shorted in the literal block.

Sample usage::

:template-fields:`airflow.contrib.operators.gcp_natural_language_operator.CloudLanguageAnalyzeSentimentOperator`

For further information look at:

* [http://docutils.sourceforge.net/docs/howto/rst-roles.html](Creating reStructuredText Interpreted
  Text Roles)