code: def test_vertex_vector_property(dask_client):
      from cugraph.experimental import MGPropertyGraph
  
      (
          merchants,
          users,
          transactions,
          relationships,
          referrals,
      ) = dataset1.values()
  
      pG = MGPropertyGraph()
      m_df = cudf.DataFrame(columns=merchants[0], data=merchants[1])
      merchants_df = dask_cudf.from_cudf(m_df, npartitions=2)
      with pytest.raises(ValueError):
          # Column doesn't exist
          pG.add_vertex_data(
              merchants_df,
              type_name="merchants",
              vertex_col_name="merchant_id",
              vector_properties={
                  "vec1": ["merchant_location", "BAD_NAME"]
              },
          )
      with pytest.raises(ValueError):
          # Using reserved name
          pG.add_vertex_data(
              merchants_df,
              type_name="merchants",
              vertex_col_name="merchant_id",
              vector_properties={
                  pG.type_col_name: [
                      "merchant_location",
                      "merchant_size",
                  ]
              },
          )
      with pytest.raises(TypeError):
          # String value invalid
          pG.add_vertex_data(
              merchants_df,
              type_name="merchants",
              vertex_col_name="merchant_id",
              vector_properties={"vec1": "merchant_location"},
          )
      with pytest.raises(ValueError):
          # Length-0 vector not allowed
          pG.add_vertex_data(
              merchants_df,
              type_name="merchants",
              vertex_col_name="merchant_id",
              vector_properties={"vec1": []},
          )
      pG.add_vertex_data(
          merchants_df,
          type_name="merchants",
          vertex_col_name="merchant_id",
          vector_properties={
              "vec1": [
                  "merchant_location",
                  "merchant_size",
                  "merchant_num_employees",
              ]
          },
      )
      df = pG.get_vertex_data()
      expected_columns = {
          pG.vertex_col_name,
          pG.type_col_name,
          "merchant_sales",
          "merchant_name",
          "vec1",
      }
      assert set(df.columns) == expected_columns
      expected = m_df[
          [
              "merchant_location",
              "merchant_size",
              "merchant_num_employees",
          ]
      ].values
      expected = expected[
          np.lexsort(expected.T)
      ]  # may be jumbled, so sort
  
      vec1 = pG.vertex_vector_property_to_array(df, "vec1").compute()
      vec1 = vec1[np.lexsort(vec1.T)]  # may be jumbled, so sort
      assert_array_equal(expected, vec1)
      vec1 = pG.vertex_vector_property_to_array(
          df, "vec1", missing="error"
      ).compute()
      vec1 = vec1[np.lexsort(vec1.T)]  # may be jumbled, so sort
      assert_array_equal(expected, vec1)
      with pytest.raises(ValueError):
          pG.vertex_vector_property_to_array(df, "BAD_NAME")
  
      u_df = cudf.DataFrame(columns=users[0], data=users[1])
      users_df = dask_cudf.from_cudf(u_df, npartitions=2)
      with pytest.raises(ValueError):
          # Length doesn't match existing vector
          pG.add_vertex_data(
              users_df,
              type_name="users",
              vertex_col_name="user_id",
              property_columns=["vertical"],
              vector_properties={"vec1": ["user_location", "vertical"]},
          )
      with pytest.raises(ValueError):
          # Can't assign property to existing vector column
          pG.add_vertex_data(
              users_df.assign(vec1=users_df["user_id"]),
              type_name="users",
              vertex_col_name="user_id",
              property_columns=["vec1"],
          )
  
      pG.add_vertex_data(
          users_df,
          type_name="users",
          vertex_col_name="user_id",
          property_columns=["vertical"],
          vector_properties={"vec2": ["user_location", "vertical"]},
      )
      expected_columns.update({"vec2", "vertical"})
      df = pG.get_vertex_data()
      assert set(df.columns) == expected_columns
      vec1 = pG.vertex_vector_property_to_array(df, "vec1").compute()
      vec1 = vec1[np.lexsort(vec1.T)]  # may be jumbled, so sort
      assert_array_equal(expected, vec1)
      with pytest.raises(RuntimeError):
          pG.vertex_vector_property_to_array(
              df, "vec1", missing="error"
          ).compute()
  
      pGusers = MGPropertyGraph()
      pGusers.add_vertex_data(
          users_df,
          type_name="users",
          vertex_col_name="user_id",
          vector_property="vec3",
      )
      vec2 = pG.vertex_vector_property_to_array(df, "vec2").compute()
      vec2 = vec2[np.lexsort(vec2.T)]  # may be jumbled, so sort
      df2 = pGusers.get_vertex_data()
      assert set(df2.columns) == {
          pG.vertex_col_name,
          pG.type_col_name,
          "vec3",
      }
      vec3 = pGusers.vertex_vector_property_to_array(
          df2, "vec3"
      ).compute()
      vec3 = vec3[np.lexsort(vec3.T)]  # may be jumbled, so sort
      assert_array_equal(vec2, vec3)
  
      vec1filled = pG.vertex_vector_property_to_array(
          df, "vec1", 0, missing="error"
      ).compute()
      vec1filled = vec1filled[
          np.lexsort(vec1filled.T)
      ]  # may be jumbled, so sort
      expectedfilled = np.concatenate([cp.zeros((4, 3), int), expected])
      assert_array_equal(expectedfilled, vec1filled)
  
      vec1filled = pG.vertex_vector_property_to_array(
          df, "vec1", [0, 0, 0]
      ).compute()
      vec1filled = vec1filled[
          np.lexsort(vec1filled.T)
      ]  # may be jumbled, so sort
      assert_array_equal(expectedfilled, vec1filled)
  
      with pytest.raises(ValueError, match="expected 3"):
          pG.vertex_vector_property_to_array(
              df, "vec1", [0, 0]
          ).compute()
  
      vec2 = pG.vertex_vector_property_to_array(df, "vec2").compute()
      vec2 = vec2[np.lexsort(vec2.T)]  # may be jumbled, so sort
      expected = u_df[["user_location", "vertical"]].values
      expected = expected[
          np.lexsort(expected.T)
      ]  # may be jumbled, so sort
      assert_array_equal(expected, vec2)
      with pytest.raises(TypeError):
          # Column is wrong type to be a vector
          pG.vertex_vector_property_to_array(
              df.rename(
                  columns={"vec1": "vertical", "vertical": "vec1"}
              ),
              "vec1",
          )
      with pytest.raises(ValueError):
          # Vector column doesn't exist in dataframe
          pG.vertex_vector_property_to_array(
              df.rename(columns={"vec1": "moved"}), "vec1"
          )
      with pytest.raises(TypeError):
          # Bad type
          pG.vertex_vector_property_to_array(42, "vec1")
  
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 27 for calling a global function with example usage: test_vertex_vector_property(dask_client) without return types