code: def _pagerank(
      graph,
      vertices=None,
      directed=True,
      damping=0.85,
      weights=None,
      arpack_options=None,
      implementation="prpack",
  ):
      """Calculates the PageRank values of a graph.
  
      @param vertices: the indices of the vertices being queried.
        C{None} means all of the vertices.
      @param directed: whether to consider directed paths.
      @param damping: the damping factor. M{1-damping} is the probability of
        resetting the random walk to a uniform distribution in each step.
      @param weights: edge weights to be used. Can be a sequence or iterable
        or even an edge attribute name.
      @param arpack_options: an L{ARPACKOptions} object used to fine-tune
        the ARPACK eigenvector calculation. If omitted, the module-level
        variable called C{arpack_options} is used. This argument is
        ignored if not the ARPACK implementation is used, see the
        I{implementation} argument.
      @param implementation: which implementation to use to solve the
        PageRank eigenproblem. Possible values are:
          - C{"prpack"}: use the PRPACK library. This is a new
            implementation in igraph 0.7
          - C{"arpack"}: use the ARPACK library. This implementation
            was used from version 0.5, until version 0.7.
      @return: a list with the PageRank values of the specified vertices.
      """
      if arpack_options is None:
          arpack_options = default_arpack_options
      return graph.personalized_pagerank(
          vertices,
          directed,
          damping,
          None,
          None,
          weights,
          arpack_options,
          implementation,
      )
  
imports: from igraph._igraph import IN, OUT, arpack_options
  from igraph.statistics import Histogram
  from igraph.utils import deprecated
label_desc: Use image node_id 4 for calling a global function with example usage: _pagerank(graph, vertices, directed, damping, weights, arpack_options, implementation) and returns: graph