code: def test_repr(c, expected):
      assert str(c) == expected
  
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 1 for calling a global function with example usage: test_repr(c, expected) without return types