code: def test_generator_stop():
      class X(object):
          def __getattr__(self, name):
              raise StopIteration()
  
      t = Template("a{{ bad.bar() }}b")
      with pytest.raises(RuntimeError):
          t.render(bad=X())
  
file_path: catboost/contrib/python/Jinja2/py2/tests/test_features.py
imports: import sys
  import pytest
  from jinja2 import contextfilter
  from jinja2 import Environment
  from jinja2 import Template
  from jinja2._compat import text_type
label_desc: Use image node_id 1 for calling a global function with example usage: test_generator_stop() without return types