code: def test_from_list_of_sockets():
      sender_sockets = [
          OutputSocket("out_int", int),
          OutputSocket("out_str", str),
      ]
  
      receiver_sockets = [InputSocket("in_str", str)]
  
      c = Connection.from_list_of_sockets(
          "from_node", sender_sockets, "to_node", receiver_sockets
      )
      assert c.sender_socket.name == "out_str"
  
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 3 for calling a global function with example usage: test_from_list_of_sockets() without return types