code: def test_complex_condition(self):
      routes = [
          {
              "condition": "{{messages[-1].meta.finish_reason == 'function_call'}}",
              "output": "{{streams}}",
              "output_type": List[int],
              "output_name": "streams",
          },
          {
              "condition": "{{True}}",
              "output": "{{query}}",
              "output_type": str,
              "output_name": "query",
          },  # catch-all condition
      ]
      router = ConditionalRouter(routes)
      message = mock.MagicMock()
      message.meta.finish_reason = "function_call"
      result = router.run(
          messages=[message], streams=[1, 2, 3], query="my query"
      )
      assert result == {"streams": [1, 2, 3]}
  
imports: import copy
  from typing import List
  from unittest import mock
  import pytest
  from haystack.components.routers import ConditionalRouter
  from haystack.components.routers.conditional_router import NoRouteSelectedException
  from haystack.dataclasses import ChatMessage
label_desc: Use image node_id 10 for calling the TestRouter obj's underlying member method code with example usage: obj.test_complex_condition() without return types