Wrote docstring for binary tree generator method