code: def calc_random_walks(
      G, max_depth=None, use_padding=False, legacy_result_type=True
  ):
      """
      compute random walks for each nodes in 'start_vertices'
  
      parameters
      ----------
      G : cuGraph.Graph or networkx.Graph
          The graph can be either directed or undirected.
          Weights in the graph are ignored.
          Use weight parameter if weights need to be considered
          (currently not supported)
  
      start_vertices : int or list or cudf.Series
          A single node or a list or a cudf.Series of nodes from which to run
          the random walks
  
      max_depth : int
          The maximum depth of the random walks
  
      use_padding : bool
          If True, padded paths are returned else coalesced paths are returned.
  
      Returns
      -------
      vertex_paths : cudf.Series or cudf.DataFrame
          Series containing the vertices of edges/paths in the random walk.
  
      edge_weight_paths: cudf.Series
          Series containing the edge weights of edges represented by the
          returned vertex_paths
  
      sizes: int
          The path size in case of coalesced paths.
      """
      assert G is not None
  
      G, _ = ensure_cugraph_obj_for_nx(G, nx_weight_attr="wgt")
  
      k = random.randint(1, 6)
  
      random_walks_type = "uniform"
  
      start_vertices = G.select_random_vertices(num_vertices=k)
  
      print("\nstart_vertices is \n", start_vertices)
      (
          vertex_paths,
          edge_weights,
          vertex_path_sizes,
      ) = cugraph.random_walks(
          G,
          random_walks_type,
          start_vertices,
          max_depth,
          use_padding,
          legacy_result_type,
      )
  
      return (
          vertex_paths,
          edge_weights,
          vertex_path_sizes,
      ), start_vertices
  
file_path: cugraph/python/cugraph/cugraph/tests/sampling/test_random_walks.py
imports: import gc
  import random
  import pytest
  import networkx
  import cudf
  import cugraph
  from cudf.testing import assert_series_equal
  from cugraph.utilities import ensure_cugraph_obj_for_nx
  from cugraph.testing import SMALL_DATASETS, DEFAULT_DATASETS
label_desc: Use image node_id 2 for calling a global function with example usage: calc_random_walks(G, max_depth, use_padding, legacy_result_type) and returns: vertex_paths,  edge_weights,  vertex_path_sizes,  start_vertices