what is recursion used for in python