code: def test_node2vec_invalid(graph_file):
      G = graph_file.get_graph(
          download=True, create_using=cugraph.Graph(directed=True)
      )
      k = random.randint(1, 10)
      start_vertices = cudf.Series(
          random.sample(range(G.number_of_vertices()), k), dtype="int32"
      )
      compress = True
      max_depth = 1
      p = 1
      q = 1
      invalid_max_depths = [None, -1, "1", 4.5]
      invalid_pqs = [None, -1, "1"]
      invalid_start_vertices = [1.0, "1", 2147483648]
  
      # Tests for invalid max_depth
      for bad_depth in invalid_max_depths:
          with pytest.raises(ValueError):
              df, seeds = calc_node2vec(
                  G,
                  start_vertices,
                  max_depth=bad_depth,
                  compress_result=compress,
                  p=p,
                  q=q,
              )
      # Tests for invalid p
      for bad_p in invalid_pqs:
          with pytest.raises(ValueError):
              df, seeds = calc_node2vec(
                  G,
                  start_vertices,
                  max_depth=max_depth,
                  compress_result=compress,
                  p=bad_p,
                  q=q,
              )
      # Tests for invalid q
      for bad_q in invalid_pqs:
          with pytest.raises(ValueError):
              df, seeds = calc_node2vec(
                  G,
                  start_vertices,
                  max_depth=max_depth,
                  compress_result=compress,
                  p=p,
                  q=bad_q,
              )
  
      # Tests for invalid start_vertices dtypes, modify when more types are
      # supported
      for bad_start in invalid_start_vertices:
          with pytest.raises(ValueError):
              df, seeds = calc_node2vec(
                  G,
                  bad_start,
                  max_depth=max_depth,
                  compress_result=compress,
                  p=p,
                  q=q,
              )
  
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 4 for calling a global function with example usage: test_node2vec_invalid(graph_file) without return types