Is there a way to do a graph based depth first traversal recursively without passing a "visited" parameter set of visited nodes (or having one as a class attribute