code: def test_invalid_servable_composition(
      tmp_path, lightning_squeezenet1_1_obj, squeezenet_servable
  ):
      from tests.core.serve.models import (
          ClassificationInferenceModelMapping,
      )
  
      squeezenet_gm, _ = squeezenet_servable
  
      invalid_model_map = {"model_one": squeezenet_gm, "model_two": 235}
      with pytest.raises(TypeError):
          _ = ClassificationInferenceModelMapping(invalid_model_map)
  
      with pytest.raises(TypeError):
          _ = ClassificationInferenceModelMapping(lambda x: x + 1)
  
file_path: lightning-flash/tests/core/serve/test_composition.py
imports: import base64
  from dataclasses import asdict
  import pytest
  from flash.core.serve import Composition, Endpoint
  from flash.core.utilities.imports import _FASTAPI_AVAILABLE, _TOPIC_SERVE_AVAILABLE
label_desc: Use image node_id 6 for calling a global function with example usage: test_invalid_servable_composition(tmp_path, lightning_squeezenet1_1_obj, squeezenet_servable) without return types