code: def test_output_type_deserialization():
      assert deserialize_type("str") == str
      assert deserialize_type("typing.List[int]") == typing.List[int]
      assert (
          deserialize_type("typing.List[typing.Dict[str, int]]")
          == typing.List[Dict[str, int]]
      )
      assert deserialize_type("typing.Dict[str, int]") == Dict[str, int]
      assert (
          deserialize_type("typing.Dict[str, typing.List[int]]")
          == Dict[str, List[int]]
      )
      assert (
          deserialize_type(
              "typing.List[typing.Dict[str, typing.List[int]]]"
          )
          == List[Dict[str, List[int]]]
      )
      assert (
          deserialize_type(
              "typing.List[haystack.dataclasses.chat_message.ChatMessage]"
          )
          == typing.List[ChatMessage]
      )
      assert (
          deserialize_type(
              "typing.Dict[int, haystack.dataclasses.chat_message.ChatMessage]"
          )
          == typing.Dict[int, ChatMessage]
      )
      assert (
          deserialize_type(
              "haystack.dataclasses.chat_message.ChatMessage"
          )
          == ChatMessage
      )
      assert deserialize_type("int") == int
  
imports: import copy
  import typing
  from typing import List, Dict
  from haystack.dataclasses import ChatMessage
  from haystack.components.routers.conditional_router import serialize_type, deserialize_type
label_desc: Use image node_id 2 for calling a global function with example usage: test_output_type_deserialization() without return types