code: def test_custom_async_iteratable_filter(env_async, items):
      async def customfilter(iterable):
          items = []
          async for item in auto_aiter(iterable):
              items.append(str(item))
              if len(items) == 3:
                  break
          return ",".join(items)
  
      env_async.filters["customfilter"] = customfilter
      tmpl = env_async.from_string(
          "{{ items()|customfilter }} .. {{ [3, 4, 5, 6]|customfilter }}"
      )
      out = tmpl.render(items=items)
      assert out == "0,1,2 .. 3,4,5"
  
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 29 for calling a global function with example usage: test_custom_async_iteratable_filter(env_async, items) and returns: str