code: def test_num_vertices_with_properties(
      dataset2_simple_MGPropertyGraph,
  ):
      """
      Checks that the num_vertices_with_properties attr is set to the number of
      vertices that have properties, as opposed to just num_vertices which also
      includes all verts in the graph edgelist.
      """
      (pG, data) = dataset2_simple_MGPropertyGraph
  
      # assume no repeated vertices
      assert pG.get_num_vertices() == len(data[1]) * 2
      assert pG.get_num_vertices(include_edge_data=False) == 0
  
      df = cudf.DataFrame(
          {
              "vertex": [98, 97],
              "some_property": ["a", "b"],
          }
      )
      mgdf = dask_cudf.from_cudf(df, npartitions=2)
      pG.add_vertex_data(mgdf, vertex_col_name="vertex")
  
      # assume no repeated vertices
      assert pG.get_num_vertices() == len(data[1]) * 2
      assert pG.get_num_vertices(include_edge_data=False) == 2
      assert type_is_categorical(pG)
  
imports: import gc
  import pytest
  import pandas
  import numpy
  import cudf
  import cugraph
  import dask_cudf
  import cupy
  import cugraph.dask
  from cupy.testing import assert_array_equal
  from cudf.testing import assert_frame_equal, assert_series_equal
  from pylibcugraph.testing.utils import gen_fixture_params_product
  from cugraph.dask.common.mg_utils import is_single_gpu
  from cugraph.datasets import cyber, netscience
label_desc: Use image node_id 16 for calling a global function with example usage: test_num_vertices_with_properties(dataset2_simple_MGPropertyGraph) without return types