def _split_by_last_pattern(self, text, separator):
    """Splits the text by the last occurrence of the separator.

    Args:
      text: The text to split.
      separator: The separator to split on.

    Returns:
      A tuple containing the text before the last separator and the text after
      the last separator.
    """
    index = text.rfind(separator)
    if index == -1:
      return text, ''
    return text[: index + len(separator)], text[index + len(separator) :]
Splits the text by the last occurrence of the separator.

    Args:
      text: The text to split.
      separator: The separator to split on.

    Returns:
      A tuple containing the text before the last separator and the text after
      the last separator.
    
src/google/adk/planners/plan_re_act_planner.py