class_docstr: A tokenizer using externally precomputed tokenization.
class_docstr_tok: ["A","tokenizer","using","externally","precomputed","tokenization","."]
docstr: Load a precomputed pool via one of the supported ways.
docstr_tok: ["Load","a","precomputed","pool","via","one","of","the","supported","ways","."]
code: def _load_pool(
      cls,
      *,
      path: Optional[pathlib.Path] = None,
      url: Optional[str] = None,
      download_kwargs: OptionalKwargs = None,
      pool: Optional[Mapping[int, Collection[int]]] = None,
      loader: HintOrType[PrecomputedTokenizerLoader] = None,
  ) -> Tuple[Mapping[int, Collection[int]], int]:
      """Load a precomputed pool via one of the supported ways."""
      if pool is not None:
          return (
              pool,
              max(c for candidates in pool.values() for c in candidates)
              + 1
              + 1,
          )  # +1 for padding
      if url is not None and path is None:
          module = PYKEEN_MODULE.module(
              __name__, tokenizer_resolver.normalize_cls(cls=cls)
          )
          path = module.ensure(url=url, download_kwargs=download_kwargs)
      if path is None:
          raise ValueError(
              "Must provide at least one of pool, path, or url."
          )
  
      if not path.is_file():
          raise FileNotFoundError(path)
      logger.info(f"Loading precomputed pools from {path}")
      return precomputed_tokenizer_loader_resolver.make(loader)(
          path=path
      )
  
imports: import logging
  import pathlib
  from abc import abstractmethod
  from collections import defaultdict
  from typing import Collection, Mapping, Optional, Tuple
  import more_itertools
  import numpy
  import torch
  from class_resolver import ClassResolver, HintOrType, OptionalKwargs
  from .anchor_search import AnchorSearcher, anchor_searcher_resolver
  from .anchor_selection import AnchorSelection, anchor_selection_resolver
  from .loader import PrecomputedTokenizerLoader, precomputed_tokenizer_loader_resolver
  from .utils import prepare_edges_for_metis, random_sample_no_replacement
  from ...constants import PYKEEN_MODULE
  from ...typing import DeviceHint, MappedTriples
  from ...utils import format_relative_comparison, get_edge_index, resolve_device
label_desc: Use image node_id 1 for calling the PrecomputedPoolTokenizer obj's underlying member method code with example usage: obj._load_pool(cls) and returns: precomputed_tokenizer_loader_resolver, pool,  unknown