code: def rw_path(
      num_paths: int, sizes: cudf.Series
  ) -> Tuple[cudf.Series, cudf.Series, cudf.Series]:
      """
      Retrieve more information on the obtained paths in case use_padding
      is False.
  
      parameters
      ----------
      num_paths: int
          Number of paths in the random walk output.
  
      sizes: cudf.Series
          Path size returned in random walk output.
  
      Returns
      -------
      path_data : cudf.DataFrame
          Dataframe containing vetex path offsets, edge weight offsets and
          edge weight sizes for each path.
      """
  
      vertex_offsets = cudf.Series(0, dtype=sizes.dtype)
      vertex_offsets = cudf.concat(
          [vertex_offsets, sizes.cumsum()[:-1]], ignore_index=True
      )
      weight_sizes = sizes - 1
  
      weight_offsets = cudf.Series(0, dtype=sizes.dtype)
      num_edges = vertex_offsets.diff()[1:] - 1
  
      weight_offsets = cudf.concat(
          [weight_offsets, num_edges.cumsum()], ignore_index=True
      )
      # FIXME: CUDF bug. concatenating two series of type int32 but get a CUDF of
      # type 'int64' have to cast the results
      weight_offsets = weight_offsets.astype(sizes.dtype)
  
      path_data = cudf.DataFrame()
      path_data["vertex_offsets"] = vertex_offsets
      path_data["weight_sizes"] = weight_sizes
      path_data["weight_offsets"] = weight_offsets
  
      return path_data[:num_paths]
  
file_path: cugraph/python/cugraph/cugraph/sampling/random_walks.py
imports: import cudf
  import cupy
  from pylibcugraph import ResourceHandle
  from pylibcugraph import uniform_random_walks
  from cugraph.utilities import ensure_cugraph_obj_for_nx
  from cugraph.structure import Graph
  import warnings
  from cugraph.utilities.utils import import_optional
  from typing import Union, Tuple
label_desc: Use image node_id 3 for calling a global function with example usage: rw_path(num_paths, sizes) and returns: path_data