code: def check_random_walks(path_data, seeds, G):
      invalid_edge = 0
      invalid_seeds = 0
      offsets_idx = 0
      next_path_idx = 0
      v_paths = path_data[0]
      df_G = G.input_df
  
      sizes = path_data[2].to_numpy().tolist()
  
      for s in sizes:
          for i in range(next_path_idx, next_path_idx + s - 1):
              src, dst = v_paths.iloc[i], v_paths.iloc[i + 1]
              if i == next_path_idx and src != seeds[offsets_idx]:
                  invalid_seeds += 1
                  print(
                      "[ERR] Invalid seed: "
                      " src {} != src {}".format(
                          src, seeds[offsets_idx]
                      )
                  )
          offsets_idx += 1
          next_path_idx += s
  
          exp_edge = df_G.loc[
              (df_G["src"] == (src)) & (df_G["dst"] == (dst))
          ].reset_index(drop=True)
  
          if len(exp_edge) == 0:
              print(
                  "[ERR] Invalid edge: "
                  "There is no edge src {} dst {}".format(src, dst)
              )
              invalid_edge += 1
  
      assert invalid_edge == 0
      assert invalid_seeds == 0
  
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 3 for calling a global function with example usage: check_random_walks(path_data, seeds, G) without return types