code: def test_chinese_whispers_type_checks():
      """
      Tests contract (expected errors) in case client provides wrong types
      """
      with raises(TypeError):
          chinese_whispers()
      with raises(TypeError):
          chinese_whispers("foo")
      with raises(RuntimeError):
          chinese_whispers(["foo"])
      with raises(IndexError):
          chinese_whispers([(0,)])
      with raises(IndexError):
          chinese_whispers([(0, 1, 2, 3)])
      with raises(RuntimeError):
          chinese_whispers([("foo", "bar")])
  
imports: from random import Random
  from dlib import chinese_whispers
  from pytest import raises
label_desc: Use image node_id 3 for calling a global function with example usage: test_chinese_whispers_type_checks() without return types