class_docstr: Transforms nodes in a Knowledge Graph into an embedding.
  
  Attributes:
      _embeddings: All the embeddings of the model.
          Defaults to [].
      _entities: All the entities of the model.
          Defaults to [].
      _is_extract_walks_literals: True if the session must be closed after
          the call to the `transform` function. False, otherwise.
          Defaults to False.
      _literals: All the literals of the model.
          Defaults to [].
      _pos_entities: The positions of existing entities to be updated.
          Defaults to [].
      _pos_walks: The positions of existing walks to be updated.
          Defaults to [].
      _walks: All the walks of the model.
          Defaults to [].
      embedder: The embedding technique.
          Defaults to Word2Vec.
      walkers: The walking strategies.
          Defaults to [RandomWalker(2, None)]
      verbose: The verbosity level.
          0: does not display anything;
          1: display of the progress of extraction and training of walks;
          2: debugging.
          Defaults to 0.
class_docstr_tok: ["Transforms","nodes","in","a","Knowledge","Graph","into","an","embedding",".","Attributes",":","_embeddings",":","All","the","embeddings","of","the","model",".","Defaults","to","[","]",".","_entities",":","All","the","entities","of","the","model",".","Defaults","to","[","]",".","_is_extract_walks_literals",":","True","if","the","session","must","be","closed","after","the","call","to","the","`","transform","`","function",".","False",",","otherwise",".","Defaults","to","False",".","_literals",":","All","the","literals","of","the","model",".","Defaults","to","[","]",".","_pos_entities",":","The","positions","of","existing","entities","to","be","updated",".","Defaults","to","[","]",".","_pos_walks",":","The","positions","of","existing","walks","to","be","updated",".","Defaults","to","[","]",".","_walks",":","All","the","walks","of","the","model",".","Defaults","to","[","]",".","embedder",":","The","embedding","technique",".","Defaults","to","Word2Vec",".","walkers",":","The","walking","strategies",".","Defaults","to","[","RandomWalker","(","2",",","None",")","]","verbose",":","The","verbosity","level",".","0",":","does","not","display","anything",";","1",":","display","of","the","progress","of","extraction","and","training","of","walks",";","2",":","debugging",".","Defaults","to","0","."]
docstr: Gets the walks of an entity based on a Knowledge Graph and a
  list of walkers
  
  Args:
      kg: The Knowledge Graph.
      entities: The entities including test entities to create the
          embeddings. Since RDF2Vec is unsupervised, there is no label
          leakage.
  
  Returns:
      The walks for the given entities.
  
  Raises:
      ValueError: If the provided entities aren't in the Knowledge Graph.
docstr_tok: ["Gets","the","walks","of","an","entity","based","on","a","Knowledge","Graph","and","a","list","of","walkers","Args",":","kg",":","The","Knowledge","Graph",".","entities",":","The","entities","including","test","entities","to","create","the","embeddings",".","Since","RDF2Vec","is","unsupervised",",","there","is","no","label","leakage",".","Returns",":","The","walks","for","the","given","entities",".","Raises",":","ValueError",":","If","the","provided","entities","are","n't","in","the","Knowledge","Graph","."]
code: def get_walks(self, kg: KG, entities: Entities) -> List[List[SWalk]]:
      """Gets the walks of an entity based on a Knowledge Graph and a
      list of walkers
  
      Args:
          kg: The Knowledge Graph.
          entities: The entities including test entities to create the
              embeddings. Since RDF2Vec is unsupervised, there is no label
              leakage.
  
      Returns:
          The walks for the given entities.
  
      Raises:
          ValueError: If the provided entities aren't in the Knowledge Graph.
  
      """
      if kg.skip_verify is False and not kg.is_exist(entities):
          if kg.mul_req:
              asyncio.run(kg.connector.close())
          raise ValueError(
              "At least one provided entity does not exist in the "
              + "Knowledge Graph."
          )
  
      if self.verbose == 2:
          print(kg)
          print(self.walkers[0])
  
      walks: List[List[SWalk]] = []
      tic = time.perf_counter()
      for walker in self.walkers:
          walks += walker.extract(kg, entities, self.verbose)
      toc = time.perf_counter()
  
      self._update(self._entities, entities)
      self._update(self._walks, walks)
  
      if self.verbose >= 1:
          n_walks = sum([len(entity_walks) for entity_walks in walks])
          print(
              f"Extracted {n_walks} walks "
              + f"for {len(entities)} entities ({toc - tic:0.4f}s)"
          )
      if (
          kg._is_remote
          and kg.mul_req
          and not self._is_extract_walks_literals
      ):
          asyncio.run(kg.connector.close())
      return walks
  
file_path: pyRDF2Vec/pyrdf2vec/rdf2vec.py
imports: from __future__ import annotations
  import asyncio
  import pickle
  import time
  from typing import List, Sequence, Tuple
  import attr
  from pyrdf2vec.embedders import Embedder, Word2Vec
  from pyrdf2vec.graphs import KG
  from pyrdf2vec.typings import Embeddings, Entities, Literals, SWalk
  from pyrdf2vec.walkers import RandomWalker, Walker
label_desc: Use image node_id 3 for calling the RDF2VecTransformer obj's underlying member method code with example usage: obj.get_walks(kg, entities) and returns: walks