code: def dfs(self, node, bucket=None, order="append"):
          
          if self[node].discovered:
              return bucket
          self[node].discovered = True
          nodes_ = sorted(self[node].iternodes(), cmp=self.cmp_branch)
          for node_ in nodes_:
              self.dfs(node_, bucket, order)
          getattr(bucket, order)(node)
          self[node].examined = True
          return bucket
docs: Recursive depth first search. By default ("order" = ``"append"``) this 
          returns the **node objects** in the reverse postorder. To change this 
          into the preorder use a ``collections.deque`` as "bucket" and 
          ``"appendleft"`` as "order".
              
          Arguments:
  
            - bucket(``list`` or ``collections.dequeue``) [default: ``None``] The
              user *must* provide a new ``list`` or ``collections.dequeue`` to 
              store the nodes.
            - order(``str``) [default: ``"append"``] Method of the "bucket" which 
              will be called with the **node object** that has been examined. 
              Other valid options might be ``"appendleft"`` for a 
              ``collections.dequeue``.