code: def test_chinese_whispers():
      assert len(chinese_whispers([])) == 0
      assert len(chinese_whispers([(0, 0), (1, 1)])) == 2
  
      # Test that values from edges are actually used and that correct values are returned
      labels = chinese_whispers([(0, 0), (0, 1), (1, 1)])
      assert len(labels) == 2
      assert labels[0] == labels[1]
      labels = chinese_whispers([(0, 0), (1, 1)])
      assert len(labels) == 2
      assert labels[0] != labels[1]
  
imports: from random import Random
  from dlib import chinese_whispers
  from pytest import raises
label_desc: Use image node_id 1 for calling a global function with example usage: test_chinese_whispers() without return types