code: def test_groupby_tuple_index(env_async, items):
      tmpl = env_async.from_string(
          """
      {%- for grouper, list in items()|groupby(0) -%}
          {{ grouper }}{% for x in list %}:{{ x.1 }}{% endfor %}|
      {%- endfor %}"""
      )
      assert tmpl.render(items=items) == "a:1:2|b:1|"
  
imports: from collections import namedtuple
  import pytest
  from markupsafe import Markup
  from jinja2 import Environment
  from jinja2.async_utils import auto_aiter
label_desc: Use image node_id 6 for calling a global function with example usage: test_groupby_tuple_index(env_async, items) without return types