code: def parse_connect_string(
      connection: str,
  ) -> Tuple[str, Optional[str]]:
      """
      Returns component-connection pairs from a connect_to/from string
      """
      if "." in connection:
          split_str = connection.split(".", maxsplit=1)
          return (split_str[0], split_str[1])
      return connection, None
  
file_path: haystack/haystack/core/component/connection.py
imports: import itertools
  from typing import Optional, List, Tuple
  from dataclasses import dataclass
  from haystack.core.component.sockets import InputSocket, OutputSocket
  from haystack.core.type_utils import _type_name, _types_are_compatible
  from haystack.core.errors import PipelineConnectError
label_desc: Use image node_id 2 for calling a global function with example usage: parse_connect_string(connection) and returns: connection,  None, split_str,  split_str