harbor run -t openthoughts/tasktrove-exp-rpt-unitsyn-python-v3-unitsyn-python-0162
harbor download openthoughts/tasktrove-exp-rpt-unitsyn-python-v3-unitsyn-python-0162
Implement a function that checks for non-overlapping occurrences of the substrings "AB" and "BA" in a given string.
The function contains_non_overlapping_AB_BA(s: str) -> str should:
contains_non_overlapping_AB_BA(s: str) -> str
s
/app/solution.py
# Input s = "ABXYZBA" # Output 'YES'
# Input s = "ABBA" # Output 'NO'
Implement this functionality following the specified requirements and ensure correctness through testing.