code: def dfs(self, root = None, display = None):
          '''
          API: dfs(self, root = None, display = None)
          Description:
              Searches tree starting from node named root using depth-first
              strategy if root argument is provided. Starts search from root node
              of the tree otherwise.
          Pre:
              Node indicated by root argument should exist.
          Input:
              root: Starting node name.
              display: Display argument.
          '''
          if root == None:
              root = self.root
          if display == None:
              display = self.attr['display']
          self.traverse(root, display, Stack()f dfs(self, root = None, display = None):
          '''
          API: dfs(self, root = None, display = None)
          Description:
              Searches tree starting from node named root using depth-first
              strategy if root argument is provided. Starts search from root node
              of the tree otherwise.
          Pre:
              Node indicated by root argument should exist.
          Input:
              root: Starting node name.
              display: Display argument.
          '''
          if root == None:
              root = self.root
          if display == None:
              display = self.attr['display']
          self.traverse(root, display, Stack())
docs: API: dfs(self, root = None, display = None)
          Description:
              Searches tree starting from node named root using depth-first
              strategy if root argument is provided. Starts search from root node
              of the tree otherwise.
          Pre:
              Node indicated by root argument should exist.
          Input:
              root: Starting node name.
              display: Display argument.