docs: def traverse(self, root = None, display = None, q = Stack(),
                   priority = 'L'):
          '''
          API: traverse(self, root=None, display=None, q=Stack(), priority='L',
                        order='in')
          Description:
              Traverses tree starting from node named root if root argument is
              provided. Starts search from root node of the tree otherwise. Search
              strategy is determined by q data structure. It is DFS if q is
              Stack() and BFS if Queue().
          Input:
              root: Starting node.
              display: Display mode.
              q: Queue data structure, either Queue() or Stack().
              priority: Priority used when exploring children of the node.
              Acceptable arguments are 'L' and 'R'.
              order: Ineffective, will be removed.
          '''
          old_display = None
          if root == None:
              root = self.root
          if display == None:
              display = self.attr['display']
          else:
              old_display = self.attr['display']
              self.attr['display'] = display
          if isinstance(q, Queue):
              addToQ = q.enqueue
              removeFromQ = q.dequeue
          elif isinstance(q, Stack):
              addToQ = q.push
              removeFromQ = q.pop
          if priority == 'L':
              first_child = self.get_left_child
              second_child = self.get_right_child
          else:
              first_child = self.get_right_child
              second_child = self.get_left_child
          addToQ(root)
          while not q.isEmpty():
              current = removeFromQ()
              if display:
                  self.display(highlight = [current])
              n = first_child(current)
              if n is not None:
                  addToQ(n)
              n = second_child(current)
              if n is not None:
                  addToQ(n)
          if old_display:
              self.attr['display'] = old_display