code: def calc_node2vec(
      G, start_vertices, max_depth, compress_result, p=1.0, q=1.0
  ):
      """
      Compute node2vec for each nodes in 'start_vertices'
  
      Parameters
      ----------
      G : cuGraph.Graph or networkx.Graph
  
      start_vertices : int or list or cudf.Series
  
      max_depth : int
  
      compress_result : bool
  
      p : float
  
      q : float
      """
      assert G is not None
  
      vertex_paths, edge_weights, vertex_path_sizes = cugraph.node2vec(
          G, start_vertices, max_depth, compress_result, p, q
      )
      return (
          vertex_paths,
          edge_weights,
          vertex_path_sizes,
      ), start_vertices
  
file_path: cugraph/python/cugraph/cugraph/tests/sampling/test_node2vec.py
imports: import gc
  import random
  import pytest
  import cudf
  import cugraph
  from cugraph.datasets import small_line, karate
  from cugraph.testing import utils, SMALL_DATASETS
label_desc: Use image node_id 3 for calling a global function with example usage: calc_node2vec(G, start_vertices, max_depth, compress_result, p, q) and returns: vertex_paths,  edge_weights,  vertex_path_sizes,  start_vertices