code: def test_invalid_model_args(lightning_squeezenet1_1_obj):
      from flash.core.serve import ModelComponent, expose
      from flash.core.serve.types import Number
  
      class SomeComponent(ModelComponent):
          def __init__(self, model):
              self.model = model
  
          @expose(inputs={"param": Number()}, outputs={"out": Number()})
          @staticmethod
          def predict(param):
              return param
  
      # not a valid object type
      with pytest.raises(TypeError):
          _ = SomeComponent("INVALID")
  
      # not a valid sequence
      with pytest.raises(TypeError):
          _ = SomeComponent([lightning_squeezenet1_1_obj, "invalid"])
  
      # not a valid key
      with pytest.raises(TypeError):
          _ = SomeComponent(
              {
                  "first": lightning_squeezenet1_1_obj,
                  23: lightning_squeezenet1_1_obj,
              }
          )
  
      # not a valid value
      with pytest.raises(TypeError):
          _ = SomeComponent(
              {"first": lightning_squeezenet1_1_obj, "second": 233}
          )
  
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 11 for calling a global function with example usage: test_invalid_model_args(lightning_squeezenet1_1_obj) and returns: param