class_docstr: Tokenize entities by representing them as a bag of anchor entities.
  
  The entities are chosen by shortest path distance.
class_docstr_tok: ["Tokenize","entities","by","representing","them","as","a","bag","of","anchor","entities",".","The","entities","are","chosen","by","shortest","path","distance","."]
code: def __call__(
      self,
      mapped_triples: MappedTriples,
      num_tokens: int,
      num_entities: int,
      num_relations: int,
  ) -> Tuple[int, torch.LongTensor]:  # noqa: D102
      return self._call(
          edge_index=get_edge_index(mapped_triples=mapped_triples),
          num_tokens=num_tokens,
          num_entities=num_entities,
      )
  
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 3 for calling the AnchorTokenizer obj's underlying member method code with example usage: obj.__call__(mapped_triples, num_tokens, num_entities, num_relations) and returns: self