code: def test_dict():
      label = Label(classes={56: "classA", 48: "classB"})
      assert label.deserialize("classA") == torch.tensor(56)
  
      with pytest.raises(TypeError):
          Label(classes={"wrongtype": "classA"})
  
file_path: lightning-flash/tests/core/serve/test_types/test_label.py
imports: import pytest
  import torch
  from flash.core.serve.types import Label
  from flash.core.utilities.imports import _TOPIC_SERVE_AVAILABLE
label_desc: Use image node_id 3 for calling a global function with example usage: test_dict() without return types