code: def test_from_list_of_sockets_only_one():
      sender_sockets = [OutputSocket("out_int", int)]
  
      receiver_sockets = [InputSocket("in_str", str)]
  
      with pytest.raises(
          PipelineConnectError,
          match="their declared input and output types do not match",
      ):
          Connection.from_list_of_sockets(
              "from_node", sender_sockets, "to_node", receiver_sockets
          )
  
file_path: haystack/test/core/component/test_connection.py
imports: from haystack.core.component.connection import Connection
  from haystack.core.component.sockets import InputSocket, OutputSocket
  from haystack.core.errors import PipelineConnectError
  import pytest
label_desc: Use image node_id 6 for calling a global function with example usage: test_from_list_of_sockets_only_one() without return types