code: def test_digest(CD, size):
      c = CD()
      c.add(1)
      c.add(2)
      assert size(c.components[0]) == 2
  
      c.shift()
      assert 0 < size(c.components[0]) < 2
      assert 0 < size(c.components[1]) < 1
      assert sum(size(d) for d in c.components) == 2
  
      for i in range(len(c.components) - 1):
          assert size(c.components[i]) >= size(c.components[i + 1])
  
      c.add(3)
  
      assert sum(size(d) for d in c.components) == c.size()
  
imports: from __future__ import annotations
  import pytest
  from distributed.counter import Counter
label_desc: Use image node_id 1 for calling a global function with example usage: test_digest(CD, size) without return types