class_docstr: Represents a Knowledge Graph.
  
  Attributes:
      _entity_hops: Caches the results of asynchronous requests.
          Defaults to {}.
      _entities: Stores the entities.
          Defaults to set.
      _is_remote: True if the Knowledge Graph is in remote, False otherwise.
          Defaults to False.
      _vertices: Stores the vertices.
          Defaults to set.
      _inv_transition_matrix: Contains the parents of vertices.
          Defaults to defaultdict.
      _transition_matrix: Contains the children of vertices.
          Defaults to defaultdict.
      cache: The policy and size cache to use.
          Defaults to TTLCache(maxsize=1024, ttl=1200).
      connector: The connector to use.
          Defaults to SPARQLConnector.
      fmt: The format of the file.
          It should be used only if the format can not be determined from
          source.
          Defaults to None.
      literals: The predicate chains to get the literals.
          Defaults to [].
      location: The location of the file to load.
          Defaults to None.
      mul_req: True to allow bundling of SPARQL queries, False otherwise.
          This attribute accelerates the extraction of walks for remote
          Knowledge Graphs. Beware that this may violate the policy of some
          SPARQL endpoint server.
          Defaults to False.
      skip_predicates: The label predicates to skip from the KG.
          Defaults to set.
      skip_verify: To skip or not the verification of existing entities in a
          Knowledge Graph. Its deactivation can improve HTTP latency for KG
          remotes.
          Defaults to False.
docstr: Fills the entity hops in cache.
  
  Args:
      vertices: The vertices to get the hops.
docstr_tok: ["Fills","the","entity","hops","in","cache",".","Args",":","vertices",":","The","vertices","to","get","the","hops","."]
code: def _fill_hops(self, entities: Entities) -> None:
      """Fills the entity hops in cache.
  
      Args:
          vertices: The vertices to get the hops.
  
      """
      queries = [
          self.connector.get_query(entity) for entity in entities
      ]
      for entity, res in zip(
          entities,
          asyncio.run(self.connector.afetch(queries)),
      ):
          hops = self._res2hops(
              Vertex(entity), res["results"]["bindings"]  # type: ignore
          )
          self._entity_hops.update({entity: hops})
  
imports: import asyncio
  import operator
  from collections import defaultdict
  from typing import DefaultDict, Dict, List, Optional, Set, Tuple, Union
  import attr
  import numpy
  import rdflib
  from cachetools import Cache, TTLCache, cachedmethod
  from tqdm import tqdm
  from pyrdf2vec.connectors import SPARQLConnector
  from pyrdf2vec.graphs.vertex import Vertex
  from pyrdf2vec.typings import Entities, Hop, Literal, Literals
  from pyrdf2vec.utils.validation import _check_location
label_desc: Use image node_id 13 for calling the KG obj's underlying member method code with example usage: obj._fill_hops(entities) without return types