parameters: (s: str)
docstring: Splits a layout string by first arrow (->).
      :param s: string to split
      :return: tuple containing source and target layouts
docstring_summary: Splits a layout string by first arrow (->).
      :param s: string to split
      :return: tuple containing source and target layouts
docstring_tokens: Splits a layout string by first arrow ( - > ) . : param s : string to split : return : tuple containing source and target layouts
function: def split_layouts_by_arrow(s: str) -> tuple:
      """
      Splits a layout string by first arrow (->).
      :param s: string to split
      :return: tuple containing source and target layouts
      """
      arrow = s.find('->')
      if arrow != -1:
          source_layout = s[:arrow]
          target_layout = s[arrow + 2:]
          if source_layout == '':
              source_layout = None
          if target_layout == '':
              target_layout = None
          return source_layout, target_layout
      else:
          return s, None
function_tokens: def split_layouts_by_arrow ( s : str ) -> tuple : arrow = s . find ( '->' ) if arrow != - 1 : source_layout = s [ : arrow ] target_layout = s [ arrow + 2 : ] if source_layout == '' : source_layout = None if target_layout == '' : target_layout = None return source_layout , target_layout else : return s , None