docs: def traverse(self, root = None, display = None, q = Stack()):
          '''
          API: traverse(self, root = None, display = None, q = Stack())
          Description:
              Traverses tree starting from node named root. Used strategy (BFS,
              DFS) is controlled by argument q. It is a DFS if q is Queue(), BFS
              if q is Stack(). Starts search from root argument if it is given.
              Starts from root node of the tree otherwise.
          Pre:
              Node indicated by root argument should exist.
          Input:
              root: Starting node name.
              display: Display argument.
              q: Queue data structure instance. It is either a Stack() or
              Queue().
          '''
          if root == None:
              root = self.root
          if display == None:
              display = self.attr['display']
          if isinstance(q, Queue):
              addToQ = q.enqueue
              removeFromQ = q.dequeue
          elif isinstance(q, Stack):
              addToQ = q.push
              removeFromQ = q.pop
          addToQ(root)
          while not q.isEmpty():
              current = removeFromQ()
              #print current
              if display:
                  self.display(highlight = [current])
              for n in self.get_children(current):
                  addToQ(n)