You have defined a function that has too many levels of recursion.
Simplify the function to use fewer levels of recursion.