code: def test_invalid_config_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, config=None):
              self.model = model
              self.config = config
  
          @expose(inputs={"param": Number()}, outputs={"out": Number()})
          def predict(self, param):
              return param
  
      # not a dict
      with pytest.raises(TypeError, match="Config must be"):
          _ = SomeComponent(
              lightning_squeezenet1_1_obj, config="invalid"
          )
  
      # not a str key
      with pytest.raises(TypeError, match="config key"):
          _ = SomeComponent(
              lightning_squeezenet1_1_obj, config={12: "value"}
          )
  
      # not a primitive value
      with pytest.raises(TypeError, match="config val"):
          _ = SomeComponent(
              lightning_squeezenet1_1_obj, config={"key": lambda x: x}
          )
  
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 10 for calling a global function with example usage: test_invalid_config_args(lightning_squeezenet1_1_obj) and returns: param