class_docstr: Class to do fast first-order random walks.
  
  Args:
      walk_length (int): Number of random walks.
      walk_number (int): Number of nodes in truncated walk.
class_docstr_tok: ["Class","to","do","fast","first-order","random","walks",".","Args",":","walk_length","(","int",")",":","Number","of","random","walks",".","walk_number","(","int",")",":","Number","of","nodes","in","truncated","walk","."]
docstr: Doing a single truncated random walk from a source node.
  
  Arg types:
      * **node** *(int)* - The source node of the random walk.
  
  Return types:
      * **walk** *(list of strings)* - A single truncated random walk.
docstr_tok: ["Doing","a","single","truncated","random","walk","from","a","source","node",".","Arg","types",":","*","*","*","node","*","*","*","(","int",")","*","-","The","source","node","of","the","random","walk",".","Return","types",":","*","*","*","walk","*","*","*","(","list","of","strings",")","*","-","A","single","truncated","random","walk","."]
code: def do_walk(self, node: int) -> List[str]:
      """
      Doing a single truncated random walk from a source node.
  
      Arg types:
          * **node** *(int)* - The source node of the random walk.
  
      Return types:
          * **walk** *(list of strings)* - A single truncated random walk.
      """
      walk: List[int] = [node]
      for _ in range(self.walk_length - 1):
          nebs = [node for node in self.graph.neighbors(walk[-1])]
          if len(nebs) > 0:
              walk = walk + random.sample(nebs, 1)
      walk = [str(w) for w in walk]
      return walk
  
imports: import random
  from functools import partial
  from typing import List, Callable
  import numpy
  import networkx
label_desc: Use image node_id 2 for calling the RandomWalker obj's underlying member method code with example usage: obj.do_walk(node) and returns: walk