code: def _write_walks_to_disk(args):
      num_paths, path_length, alpha, rand, f = args
      G = __current_graph
      t_0 = time()
      with open(f, "w") as fout:
          for walk in graph.build_deepwalk_corpus_iter(
              G=G,
              num_paths=num_paths,
              path_length=path_length,
              alpha=alpha,
              rand=rand,
          ):
              fout.write("{}\n".format(" ".join(v for v in walk)))
      logger.debug(
          "Generated new file {}, it took {} seconds".format(
              f, time() - t_0
          )
      )
      return f
  
file_path: deepwalk/deepwalk/walks.py
imports: import logging
  from io import open
  from os import path
  from time import time
  from multiprocessing import cpu_count
  import random
  from concurrent.futures import ProcessPoolExecutor
  from collections import Counter
  from six.moves import zip
  from .None import graph
label_desc: Use image node_id 4 for calling a global function with example usage: _write_walks_to_disk(args) and returns: f