code: def test_component_initialization(lightning_squeezenet1_1_obj):
      with pytest.raises(TypeError):
          ClassificationInferenceComposable(
              wrongname=lightning_squeezenet1_1_obj
          )
  
      comp = ClassificationInferenceComposable(
          lightning_squeezenet1_1_obj
      )
      assert comp.uid == "callnum_1"
      assert hasattr(comp.inputs, "img")
      assert hasattr(comp.inputs, "tag")
      assert hasattr(comp.outputs, "predicted_tag")
      assert hasattr(comp.outputs, "cropped_img")
      assert "img" in comp.inputs
      assert "predicted_tag" in comp.outputs
  
file_path: lightning-flash/tests/core/serve/test_components.py
imports: import pytest
  import torch
  from flash.core.serve.types import Label
  from flash.core.utilities.imports import _TOPIC_SERVE_AVAILABLE
  from tests.core.serve.models import ClassificationInferenceComposable, LightningSqueezenet
label_desc: Use image node_id 5 for calling a global function with example usage: test_component_initialization(lightning_squeezenet1_1_obj) without return types