class_docstr: A loader for pickle files provided by Galkin *et al*.
  
  .. seealso ::
      https://github.com/migalkin/NodePiece/blob/9adc57efe302919d017d74fc648f853308cf75fd/download_data.sh
      https://github.com/migalkin/NodePiece/blob/9adc57efe302919d017d74fc648f853308cf75fd/ogb/download.sh
class_docstr_tok: ["A","loader","for","pickle","files","provided","by","Galkin","*","et","al","*",".","..","seealso",":",":","https",":","\/\/github.com\/migalkin\/NodePiece\/blob\/9adc57efe302919d017d74fc648f853308cf75fd\/download_data.sh","https",":","\/\/github.com\/migalkin\/NodePiece\/blob\/9adc57efe302919d017d74fc648f853308cf75fd\/ogb\/download.sh"]
code: def __call__(
      self, path: pathlib.Path
  ) -> Tuple[Mapping[int, Collection[int]], int]:  # noqa: D102
      with path.open(mode="rb") as pickle_file:
          # contains: anchor_ids, entity_ids, mapping {entity_id -> {"ancs": anchors, "dists": distances}}
          anchor_ids, mapping = pickle.load(pickle_file)[0::2]
      logger.info(
          f"Loaded precomputed pools with {len(anchor_ids)} anchors, and {len(mapping)} pools."
      )
      # normalize anchor_ids
      anchor_map = {a: i for i, a in enumerate(anchor_ids) if a >= 0}
      # cf. https://github.com/pykeen/pykeen/pull/822#discussion_r822889541
      # TODO: keep distances?
      return {
          key: [anchor_map[a] for a in value["ancs"] if a in anchor_map]
          for key, value in tqdm(
              mapping.items(),
              desc="ID Mapping",
              unit_scale=True,
              leave=False,
          )
      }, len(anchor_map)
  
file_path: pykeen/src/pykeen/nn/node_piece/loader.py
imports: import logging
  import pathlib
  import pickle
  from abc import ABC, abstractmethod
  from typing import Collection, Mapping, Tuple
  import numpy
  import torch
  from class_resolver import ClassResolver
  from tqdm.auto import tqdm
label_desc: Use image node_id 1 for calling the GalkinPrecomputedTokenizerLoader obj's underlying member method code with example usage: obj.__call__(path) and returns: unknown,  len