code: def test_renumber_vertices_by_type(
      dataset1_MGPropertyGraph, prev_id_column
  ):
      from cugraph.experimental import MGPropertyGraph
  
      (pG, data) = dataset1_MGPropertyGraph
      with pytest.raises(ValueError, match="existing column"):
          pG.renumber_vertices_by_type("merchant_size")
      vertex_property_names = set(pG.vertex_property_names)
      edge_property_names = set(pG.edge_property_names)
      df_id_ranges = pG.renumber_vertices_by_type(prev_id_column)
      if prev_id_column is not None:
          vertex_property_names.add(prev_id_column)
      assert vertex_property_names == set(pG.vertex_property_names)
      assert edge_property_names == set(pG.edge_property_names)
      expected = {
          "merchants": [0, 4],  # stop is inclusive
          "users": [5, 8],
      }
      for key, (start, stop) in expected.items():
          assert df_id_ranges.loc[key, "start"] == start
          assert df_id_ranges.loc[key, "stop"] == stop
          df = pG.get_vertex_data(types=[key]).compute().to_pandas()
          df = df.reset_index(drop=True)
          assert len(df) == stop - start + 1
          assert (
              df["_VERTEX_"] == pd.Series(range(start, stop + 1))
          ).all()
          if prev_id_column is not None:
              cur = df[prev_id_column].sort_values()
              expected = sorted(x for x, *args in data[key][1])
              assert (cur == pd.Series(expected, index=cur.index)).all()
  
      # Make sure we renumber vertex IDs in edge data too
      df = pG.get_edge_data().compute()
      assert (
          0 <= df[pG.src_col_name].min() < df[pG.src_col_name].max() < 9
      )
      assert (
          0 <= df[pG.dst_col_name].min() < df[pG.dst_col_name].max() < 9
      )
  
      empty_pG = MGPropertyGraph()
      assert empty_pG.renumber_vertices_by_type(prev_id_column) is None
  
      # Test when vertex IDs only exist in edge data
      df = cudf.DataFrame({"src": [99998], "dst": [99999]})
      df = dask_cudf.from_cudf(df, npartitions=1)
      empty_pG.add_edge_data(df, ["src", "dst"])
      with pytest.raises(
          NotImplementedError, match="only exist in edge"
      ):
          empty_pG.renumber_vertices_by_type(prev_id_column)
  
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 23 for calling a global function with example usage: test_renumber_vertices_by_type(dataset1_MGPropertyGraph, prev_id_column) without return types