class_docstr: Select closest anchors as the nodes with the largest personalized page rank.
  
  .. seealso::
      http://web.stanford.edu/class/cs224w/slides/04-pagerank.pdf
class_docstr_tok: ["Select","closest","anchors","as","the","nodes","with","the","largest","personalized","page","rank",".","..","seealso",":",":","http",":","\/\/web.stanford.edu\/class\/cs224w\/slides\/04-pagerank.pdf"]
docstr: Initialize the searcher.
  
  :param batch_size:
      the batch size to use.
  :param use_tqdm:
      whether to use tqdm
  :param page_rank_kwargs:
      keyword-based parameters used for :func:`page_rank`. Must not include `edge_index`, or `x0`.
docstr_tok: ["Initialize","the","searcher",".",":","param","batch_size",":","the","batch","size","to","use",".",":","param","use_tqdm",":","whether","to","use","tqdm",":","param","page_rank_kwargs",":","keyword-based","parameters","used","for",":","func",":","`","page_rank","`",".","Must","not","include","`","edge_index","`",",","or","`","x0","`","."]
code: def __init__(
      self,
      batch_size: int = 1,
      use_tqdm: bool = False,
      page_rank_kwargs: OptionalKwargs = None,
  ):
      """
      Initialize the searcher.
  
      :param batch_size:
          the batch size to use.
      :param use_tqdm:
          whether to use tqdm
      :param page_rank_kwargs:
          keyword-based parameters used for :func:`page_rank`. Must not include `edge_index`, or `x0`.
      """
      self.batch_size = batch_size
      self.page_rank_kwargs = page_rank_kwargs or {}
      self.use_tqdm = use_tqdm
  
imports: import logging
  from abc import ABC, abstractmethod
  from typing import Iterable, Optional
  import numpy
  import scipy.sparse
  import torch
  from class_resolver import ClassResolver, OptionalKwargs
  from torch_ppr import page_rank
  from torch_ppr.utils import edge_index_to_sparse_matrix, prepare_page_rank_adjacency, prepare_x0
  from tqdm.auto import tqdm
  from .utils import ensure_num_entities
  from ...typing import DeviceHint
  from ...utils import ExtraReprMixin, format_relative_comparison, resolve_device
label_desc: Use image node_id 1 to create a new PersonalizedPageRankAnchorSearcher object from inherited base classes: AnchorSearcher with example: obj = PersonalizedPageRankAnchorSearcher(batch_size, use_tqdm, page_rank_kwargs)