docs: def dfs(self, root, disc_count = 0, finish_count = 1, component = None,
              transpose = False, display = None, pred = None):
          '''
          API: dfs(self, root, disc_count = 0, finish_count = 1, component=None,
              transpose=False)
          Description:
          Make a depth-first search starting from node with name root.
          Input:
              root: Starting node name.
              disc_count: Discovery time.
              finish_count: Finishing time.
              component: component number.
              transpose: Goes in the reverse direction along edges if transpose
              is True.
          Post:
              Nodes will have 'component' attribute that will have component
              number as value. Updates 'disc_time' and 'finish_time' attributes
              of nodes which represents discovery time and finishing time.
          Return:
              Returns a tuple that has discovery time and finish time of the
              last node in the following form (disc_time,finish_time).
          '''
          if pred == None:
              pred = {}
          if display == None:
              display = self.attr['display']
          else:
              self.set_display_mode(display)
          neighbors = self.neighbors
          if self.graph_type == DIRECTED_GRAPH and transpose:
              neighbors = self.in_neighbors
          self.get_node(root).set_attr('component', component)
          disc_count += 1
          self.get_node(root).set_attr('disc_time', disc_count)
          self.get_node(root).set_attr('label', str(disc_count)+',-')
          self.get_node(root).set_attr('color', 'blue')
          if root in pred:
              self.set_edge_attr(pred[root], root, 'color', 'green')
          self.display()
          if transpose:
              fTime = []
              for n in neighbors[root]:
                  fTime.append((n,self.get_node(n).get_attr('finish_time')))
              neighbor_list = sorted(fTime, key=operator.itemgetter(1))
              neighbor_list = list(t[0] for t in neighbor_list)
              neighbor_list.reverse()
          else:
              neighbor_list = neighbors[root]
          for i in neighbor_list:
              if not transpose:
                  if self.get_node(i).get_attr('disc_time') is None:
                      pred[i] = root
                      disc_count, finish_count = self.dfs(i, disc_count,
                                                          finish_count,
                                                          component, transpose,
                                                          pred = pred)
              else:
                  if self.get_node(i).get_attr('component') is None:
                      disc_count, finish_count = self.dfs(i, disc_count,
                                                          finish_count,
                                                          component, transpose,
                                                          pred = pred)
          self.get_node(root).set_attr('finish_time', finish_count)
          d_time = self.get_node(root).get_attr('disc_time')
          label = '"' + str(d_time) + ',' + str(finish_count) + '"'
          self.get_node(root).set_attr('label', label)
          self.get_node(root).set_attr('color', 'green')
          self.display()
          finish_count += 1
          return disc_count, finish_count