is should be
used instead of ==.RecursionError: maximum recursion depth exceeded while pickling an object.,
it makes sense to create a stack myself to perform DFS.copy.deepcopy() can copy an entire tree that consists
of TreeNodefunctools.cachemath.isinf()a != b is a sugar syntax of
a.__ne__(b)