code: def test_get_graph_data_empty_graph(
      graph_creation_extension_empty_graph,
  ):
      """
      Tests that get_graph_*_data() handles empty graphs correctly.
      """
      from cugraph_service_server.cugraph_handler import CugraphHandler
  
      handler = CugraphHandler()
  
      extension_dir = graph_creation_extension_empty_graph
  
      # Load the extension and ensure it can be called.
      handler.load_graph_creation_extensions(extension_dir)
      new_graph_id = handler.call_graph_creation_extension(
          "graph_creation_function", "()", "{}"
      )
  
      invalid_vert_id = 2
      vert_data = handler.get_graph_vertex_data(
          id_or_ids=invalid_vert_id,
          null_replacement_value=0,
          property_keys=None,
          types=None,
          graph_id=new_graph_id,
      )
  
      assert len(pickle.loads(vert_data)) == 0
  
      invalid_edge_id = 2
      edge_data = handler.get_graph_edge_data(
          id_or_ids=invalid_edge_id,
          null_replacement_value=0,
          property_keys=None,
          types=None,
          graph_id=new_graph_id,
      )
  
      assert len(pickle.loads(edge_data)) == 0
  
file_path: cugraph/python/cugraph-service/tests/test_cugraph_handler.py
imports: import sys
  import pickle
  from pathlib import Path
  import pytest
label_desc: Use image node_id 10 for calling a global function with example usage: test_get_graph_data_empty_graph(graph_creation_extension_empty_graph) without return types