code: def _optimal_cluster_count_from_merges_and_modularity(
      graph, merges: Sequence[Tuple[int, int]], qs: List[float]
  ) -> float:
      """Helper function to find the optimal cluster count for a hierarchical
      clustering of a graph, given the merge matrix and the list of modularity
      values after each merge.
  
      Reverses the modularity vector as a side effect.
      """
      no_of_comps = graph.vcount() - len(merges)
      qs.reverse()
      return qs.index(max(qs)) + no_of_comps
  
file_path: python-igraph/src/igraph/community.py
imports: from igraph._igraph import GraphBase
  from igraph.clustering import VertexDendrogram, VertexClustering
  from igraph.utils import deprecated
  from typing import List, Sequence, Tuple
label_desc: Use image node_id 13 for calling a global function with example usage: _optimal_cluster_count_from_merges_and_modularity(graph, merges, qs) and returns: unknown