code: def _get_upper_bound(self):
          r
  
          if self.lap_type == 'normalized':
              return 2  # Equal iff the graph is bipartite.
          elif self.lap_type == 'combinatorial':
              bounds = []
              # Equal for full graphs.
              bounds += [self.n_vertices * np.max(self.W)]
              # Gershgorin circle theorem. Equal for regular bipartite graphs.
              # Special case of the below bound.
              bounds += [2 * np.max(self.dw)]
              # Anderson, Morley, Eigenvalues of the Laplacian of a graph.
              # Equal for regular bipartite graphs.
              if self.n_edges > 0:
                  sources, targets, _ = self.get_edge_list()
                  bounds += [np.max(self.dw[sources] + self.dw[targets])]
              # Merris, A note on Laplacian graph eigenvalues.
              if not self.is_directed():
                  W = self.W
              else:
                  W = utils.symmetrize(self.W, method='average')
              m = W.dot(self.dw) / self.dw  # Mean degree of adjacent vertices.
              bounds += [np.max(self.dw + m)]
              # Good review: On upper bounds for Laplacian graph eigenvalues.
              return min(bounds)
          else:
              raise ValueError('Unknown Laplacian type '
                               '{}'.format(self.lap_type))
docs: r"""Return an upper bound on the eigenvalues of the Laplacian.