class_docstr: Find closest anchors using :mod:`scipy.sparse`.
class_docstr_tok: ["Find","closest","anchors","using",":","mod",":","`","scipy.sparse","`","."]
docstr: Initialize the searcher.
  
  :param max_iter:
      the maximum number of hops to consider
docstr_tok: ["Initialize","the","searcher",".",":","param","max_iter",":","the","maximum","number","of","hops","to","consider"]
code: def __init__(self, max_iter: int = 5) -> None:
      """
      Initialize the searcher.
  
      :param max_iter:
          the maximum number of hops to consider
      """
      self.max_iter = max_iter
  
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 ScipySparseAnchorSearcher object from inherited base classes: AnchorSearcher with example: obj = ScipySparseAnchorSearcher(max_iter)