try:
      return np.min([
          len(nx.shortest_path(self._env.graph, vertex, t))