code: def test_get_edge_data(dataset1_MGPropertyGraph):
      """
      Ensure PG.get_edge_data() returns the correct data based on edge IDs passed
      in.
      """
      (pG, data) = dataset1_MGPropertyGraph
  
      # Ensure the generated edge IDs are unique
      all_edge_data = pG.get_edge_data()
      assert all_edge_data[
          pG.edge_id_col_name
      ].nunique().compute() == len(all_edge_data)
  
      # Test with specific edge IDs
      edge_ids = [4, 5, 6]
      some_edge_data = pG.get_edge_data(edge_ids)
      actual_edge_ids = some_edge_data[pG.edge_id_col_name].compute()
      if hasattr(actual_edge_ids, "values_host"):
          actual_edge_ids = actual_edge_ids.values_host
      assert sorted(actual_edge_ids) == sorted(edge_ids)
      assert some_edge_data.dtypes["_TYPE_"] == "category"
  
      # Create a list of expected column names from the three input tables
      expected_columns = set(
          [
              pG.src_col_name,
              pG.dst_col_name,
              pG.edge_id_col_name,
              pG.type_col_name,
          ]
      )
      for d in ["transactions", "relationships", "referrals"]:
          for name in data[d][0]:
              expected_columns.add(name)
      expected_columns -= {"user_id", "user_id_1", "user_id_2"}
  
      actual_columns = set(some_edge_data.columns)
  
      assert actual_columns == expected_columns
  
      # Test with specific columns and types
      edge_type = "transactions"
      columns = ["card_num", "card_type"]
  
      some_edge_data = pG.get_edge_data(
          types=[edge_type], columns=columns
      )
      # Ensure the returned df is the right length and includes only the
      # src/dst/id/type + specified columns
      standard_edge_columns = [
          pG.src_col_name,
          pG.dst_col_name,
          pG.edge_id_col_name,
          pG.type_col_name,
      ]
      assert len(some_edge_data) == len(data[edge_type][1])
      assert sorted(some_edge_data.columns) == sorted(
          columns + standard_edge_columns
      )
      assert some_edge_data.dtypes["_TYPE_"] == "category"
  
      # Test with all params specified
      # FIXME: since edge IDs are generated, assume that these are correct based
      # on the intended edges being the first three added.
      edge_ids = [0, 1, 2]
      edge_type = "transactions"
      columns = ["card_num", "card_type"]
      some_edge_data = pG.get_edge_data(
          edge_ids=edge_ids, types=[edge_type], columns=columns
      )
      # Ensure the returned df is the right length and includes at least the
      # specified columns.
      assert len(some_edge_data) == len(edge_ids)
      assert set(columns) - set(some_edge_data.columns) == set()
      assert some_edge_data.dtypes["_TYPE_"] == "category"
  
      # Allow a single edge type and single edge id to be passed in
      df1 = pG.get_edge_data(edge_ids=[1], types=[edge_type]).compute()
      df2 = pG.get_edge_data(edge_ids=1, types=edge_type).compute()
      assert len(df1) == 1
      assert df1.shape == df2.shape
      assert_frame_equal(df1, df2, check_like=True)
  
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 20 for calling a global function with example usage: test_get_edge_data(dataset1_MGPropertyGraph) without return types