code: def test_validate_labels():
      inp = {"label1": "label", "label3": "anotherlabel"}
  
      outp = inp.copy()
      utils.validate_labels(outp)
  
      assert inp == outp
  
      inp = {(12,): "non-string label key"}
  
      with pytest.raises(ValueError):
          utils.validate_labels(inp)  # type: ignore (testing bad types)
  
      inp = {"non-number label": 13}
  
      with pytest.raises(ValueError):
          utils.validate_labels(inp)  # type: ignore (testing bad types)
  
      inp = "non-dict labels"
  
      with pytest.raises(ValueError):
          utils.validate_labels(inp)
  
file_path: BentoML/tests/unit/_internal/test_utils.py
imports: from datetime import date
  from datetime import datetime
  from datetime import timedelta
  import numpy
  import pandas
  import pytest
  from scipy.sparse import csr_matrix
  import bentoml._internal.utils
  from bentoml._internal.types import LazyType
  from bentoml._internal.types import MetadataDict
label_desc: Use image node_id 2 for calling a global function with example usage: test_validate_labels() without return types