code: def test_label_validation():
      with pytest.raises(ValueError):
          auto_label("a/b")
  
      with pytest.raises(TypeError):
          auto_label(["abc"])
  
      auto_label("a_b")
  
      auto_label("123")
  
      with pytest.raises(TypeError):
          auto_label("hello", "world")
  
      with pytest.raises(ValueError, match="not entered"):
          with label_scope("test"):
              auto_label("hello", label_scope("world"))
  
file_path: nni/test/ut/sdk/mutable/test_label.py
imports: import pytest
  from nni.mutable import label_scope, auto_label
  from nni.mutable.utils import reset_uid
label_desc: Use image node_id 4 for calling a global function with example usage: test_label_validation() without return types