class_docstr: An implementation of `"Role2vec" <https://arxiv.org/abs/1802.02896>`_
  from the IJCAI '18 paper "Learning Role-based Graph Embeddings".
  The procedure uses random walks to approximate the pointwise mutual information
  matrix obtained by multiplying the pooled adjacency power matrix with a
  structural feature matrix (in this case Weisfeiler-Lehman features). This way
  one gets structural node embeddings.
  
  Args:
      walk_number (int): Number of random walks. Default is 10.
      walk_length (int): Length of random walks. Default is 80.
      dimensions (int): Dimensionality of embedding. Default is 128.
      workers (int): Number of cores. Default is 4.
      window_size (int): Matrix power order. Default is 2.
      epochs (int): Number of epochs. Default is 1.
      learning_rate (float): HogWild! learning rate. Default is 0.05.
      down_sampling (float): Down sampling frequency. Default is 0.0001.
      min_count (int): Minimal count of feature occurrences. Default is 10.
      wl_iterations (int): Number of Weisfeiler-Lehman hashing iterations. Default is 2.
      seed (int): Random seed value. Default is 42.
      erase_base_features (bool): Removing the base features. Default is False.
docstr: Accumulating the WL feature in neighbourhoods.
  
  Arg types:
      * **walks** *(list of lists)* - Random walks with string ids.
  
  Return types:
      * **new_features** *(list of TaggedDocument objects)* - The pooled features of nodes.
docstr_tok: ["Accumulating","the","WL","feature","in","neighbourhoods",".","Arg","types",":","*","*","*","walks","*","*","*","(","list","of","lists",")","*","-","Random","walks","with","string","ids",".","Return","types",":","*","*","*","new_features","*","*","*","(","list","of","TaggedDocument","objects",")","*","-","The","pooled","features","of","nodes","."]
code: def _create_documents(
      self, walks: List[List[str]], features: Dict[int, List[str]]
  ) -> List[TaggedDocument]:
      """
      Accumulating the WL feature in neighbourhoods.
  
      Arg types:
          * **walks** *(list of lists)* - Random walks with string ids.
  
      Return types:
          * **new_features** *(list of TaggedDocument objects)* - The pooled features of nodes.
      """
      new_features: Dict[int, List[str]] = {
          node: [] for node, _ in features.items()
      }
      walks: List[List[int]] = self._transform_walks(walks)
  
      for walk in walks:
          for i in range(self.walk_length - self.window_size):
              for j in range(self.window_size):
                  source = walk[i]
                  target = walk[i + j]
                  new_features[source].append(features[target])
                  new_features[target].append(features[source])
  
      new_features = {
          node: [
              feature
              for features in new_features[node]
              for feature in features
          ]
          for node, _ in new_features.items()
      }
  
      new_features = [
          TaggedDocument(words=feature, tags=[str(node)])
          for node, feature in new_features.items()
      ]
  
      return new_features
  
file_path: karateclub/karateclub/node_embedding/structural/role2vec.py
imports: from typing import Dict, List
  import numpy
  import networkx
  from gensim.models.doc2vec import Doc2Vec, TaggedDocument
  from karateclub.utils.walker import RandomWalker
  from karateclub.estimator import Estimator
  from karateclub.utils.treefeatures import WeisfeilerLehmanHashing
label_desc: Use image node_id 3 for calling the Role2Vec obj's underlying member method code with example usage: obj._create_documents(walks, features) and returns: new_features