code: def test_counter():
      c = Counter()
      c.add(1)
  
      for _ in range(5):
          c.shift()
          assert abs(sum(cc[1] for cc in c.components) - 1) < 1e-13
  
imports: from __future__ import annotations
  import pytest
  from distributed.counter import Counter
label_desc: Use image node_id 2 for calling a global function with example usage: test_counter() without return types