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: Updates an attribute with a variable.
  
  This method is useful to keep all entities, walks, literals and
  embeddings after several online training.
  
  Args:
      attr: The attribute to update
      var: The new values to add.
docstr_tok: ["Updates","an","attribute","with","a","variable",".","This","method","is","useful","to","keep","all","entities",",","walks",",","literals","and","embeddings","after","several","online","training",".","Args",":","attr",":","The","attribute","to","update","var",":","The","new","values","to","add","."]
code: def _update(self, attr, values) -> None:
      """Updates an attribute with a variable.
  
      This method is useful to keep all entities, walks, literals and
      embeddings after several online training.
  
      Args:
          attr: The attribute to update
          var: The new values to add.
  
      """
      if attr is None:
          attr = values
      elif isinstance(values[0], str):
          for i, entity in enumerate(values):
              if entity not in attr:
                  attr.append(entity)
              else:
                  self._pos_entities.append(attr.index(entity))
                  self._pos_walks.append(i)
      else:
          tmp = values
          for i, pos in enumerate(self._pos_entities):
              attr[pos] = tmp.pop(self._pos_walks[i])
          attr += tmp
  
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 6 for calling the RDF2VecTransformer obj's underlying member method code with example usage: obj._update(attr, values) without return types