Identified the root cause as surpassing Python’s default recursion limit. Implemented code to eliminate the function recursion limit.