class_docstr: Weisfeiler-Lehman feature extractor class.
  
  Args:
      graph (NetworkX graph): NetworkX graph for which we do WL hashing.
      wl_iterations (int): Number of WL iterations.
      use_node_attribute (Optional[str]): Optional attribute name to be used.
      erase_base_feature (bool): Deleting the base features.
class_docstr_tok: ["Weisfeiler-Lehman","feature","extractor","class",".","Args",":","graph","(","NetworkX","graph",")",":","NetworkX","graph","for","which","we","do","WL","hashing",".","wl_iterations","(","int",")",":","Number","of","WL","iterations",".","use_node_attribute","(","Optional","[","str","]",")",":","Optional","attribute","name","to","be","used",".","erase_base_feature","(","bool",")",":","Deleting","the","base","features","."]
docstr: The method does a single WL recursion.
  
  Return types:
      * **new_features** *(dict of strings)* - The hash table with extracted WL features.
docstr_tok: ["The","method","does","a","single","WL","recursion",".","Return","types",":","*","*","*","new_features","*","*","*","(","dict","of","strings",")","*","-","The","hash","table","with","extracted","WL","features","."]
code: def _do_a_recursion(self):
      """
      The method does a single WL recursion.
  
      Return types:
          * **new_features** *(dict of strings)* - The hash table with extracted WL features.
      """
      new_features = {}
      for node in self.graph.nodes():
          nebs = self.graph.neighbors(node)
          degs = [self.features[neb] for neb in nebs]
          features = [str(self.features[node])] + sorted(
              [str(deg) for deg in degs]
          )
          features = "_".join(features)
          hash_object = hashlib.md5(features.encode())
          hashing = hash_object.hexdigest()
          new_features[node] = hashing
      self.extracted_features = {
          k: self.extracted_features[k] + [v]
          for k, v in new_features.items()
      }
      return new_features
  
file_path: karateclub/karateclub/utils/treefeatures.py
imports: import hashlib
  import networkx
  from tqdm.auto import tqdm
  from typing import List, Dict, Optional
label_desc: Use image node_id 4 for calling the WeisfeilerLehmanHashing obj's underlying member method code with example usage: obj._do_a_recursion() and returns: new_features