code: def test_call_extension_result_on_device(
      benchmark,
      extension1,
      result_device_id,
      client_of_sg_server_on_device_1,
  ):
      client = client_of_sg_server_on_device_1
      extension_dir = extension1
      array1_len = int(1e5)
      array2_len = int(1e5)
  
      ext_mod_names = client.load_extensions(extension_dir)
  
      # my_nines_function in extension1 returns a list of two lists of 9's with
      # sizes and dtypes based on args.
      results = benchmark(
          client.call_extension,
          "my_nines_function",
          array1_len,
          "int32",
          array2_len,
          "float64",
          result_device=result_device_id,
      )
  
      if result_device_id is None:
          assert len(results) == 2
          assert len(results[0]) == array1_len
          assert len(results[1]) == array2_len
          assert type(results[0][0]) == int
          assert type(results[1][0]) == float
          assert results[0][0] == 9
          assert results[1][0] == 9.0
      else:
          # results will be a n-tuple where n is the number of arrays returned. The
          # n-tuple contains each array as a device array on result_device_id.
          assert isinstance(results, list)
          assert len(results) == 2
  
          device_n = cp.cuda.Device(result_device_id)
          assert isinstance(results[0], cp.ndarray)
          assert results[0].device == device_n
          assert results[0].tolist() == [9] * array1_len
  
          assert isinstance(results[1], cp.ndarray)
          assert results[1].device == device_n
          assert results[1].tolist() == [9.0] * array2_len
  
      for mod_name in ext_mod_names:
          client.unload_extension_module(mod_name)
  
imports: import os
  from pathlib import Path
  import pytest
  import cupy
  from cugraph_service_server.testing import utils
  from .None import data
label_desc: Use image node_id 15 for calling a global function with example usage: test_call_extension_result_on_device(benchmark, extension1, result_device_id, client_of_sg_server_on_device_1) without return types