code: def test_sg_graph(graph_data):
      from pylibcugraph import (
          SGGraph,
          ResourceHandle,
          GraphProperties,
      )
  
      # is_valid will only be True if the arrays are expected to produce a valid
      # graph. If False, ensure SGGraph() raises the proper exception.
      (
          device_srcs,
          device_dsts,
          device_weights,
          ds_name,
          is_valid,
      ) = graph_data
  
      graph_props = GraphProperties(
          is_symmetric=False, is_multigraph=False
      )
      resource_handle = ResourceHandle()
  
      if is_valid:
          g = SGGraph(  # noqa:F841
              resource_handle=resource_handle,
              graph_properties=graph_props,
              src_or_offset_array=device_srcs,
              dst_or_index_array=device_dsts,
              weight_array=device_weights,
              store_transposed=False,
              renumber=False,
              do_expensive_check=False,
          )
          # call SGGraph.__dealloc__()
          del g
  
      else:
          with pytest.raises(ValueError):
              SGGraph(
                  resource_handle=resource_handle,
                  graph_properties=graph_props,
                  src_or_offset_array=device_srcs,
                  dst_or_index_array=device_dsts,
                  weight_array=device_weights,
                  store_transposed=False,
                  renumber=False,
                  do_expensive_check=False,
              )
  
imports: import pytest
label_desc: Use image node_id 3 for calling a global function with example usage: test_sg_graph(graph_data) without return types