docstr: :param G:
  :param p: Return parameter,controls the likelihood of immediately revisiting a node in the walk.
  :param q: In-out parameter,allows the search to differentiate between “inward” and “outward” nodes
  :param use_rejection_sampling: Whether to use the rejection sampling strategy in node2vec.
docstr_tok: [":","param","G",":",":","param","p",":","Return","parameter",",","controls","the","likelihood","of","immediately","revisiting","a","node","in","the","walk",".",":","param","q",":","In-out","parameter",",","allows","the","search","to","differentiate","between","\u201c","inward","\u201d","and","\u201c","outward","\u201d","nodes",":","param","use_rejection_sampling",":","Whether","to","use","the","rejection","sampling","strategy","in","node2vec","."]
code: def __init__(self, G, p=1, q=1, use_rejection_sampling=False):
      """
      :param G:
      :param p: Return parameter,controls the likelihood of immediately revisiting a node in the walk.
      :param q: In-out parameter,allows the search to differentiate between “inward” and “outward” nodes
      :param use_rejection_sampling: Whether to use the rejection sampling strategy in node2vec.
      """
      self.G = G
      self.p = p
      self.q = q
      self.use_rejection_sampling = use_rejection_sampling
  
imports: import itertools
  import math
  import random
  import pandas
  from joblib import Parallel, delayed
  from .alias import alias_sample, create_alias_table
  from .utils import partition_num
label_desc: Use image node_id 1 to create a new RandomWalker object  with example: obj = RandomWalker(G, p, q, use_rejection_sampling)