class_docstr: Client object for cugraph_service, which defines the API that clients can
  use to access the cugraph_service server.
class_docstr_tok: ["Client","object","for","cugraph_service",",","which","defines","the","API","that","clients","can","use","to","access","the","cugraph_service","server","."]
docstr: Calls an extension on the server that was previously loaded by a prior
  call to load_extensions(), then returns the result returned by the
  extension.
  
  Parameters
  ----------
  func_name : string
      The name of the server-side extension function loaded by a prior
      call to load_graph_creation_extensions(). All graph creation
      extension functions are expected to return a new graph.
  
  *func_args : string, int, list, dictionary (optional)
      The positional args to pass to func_name. Note that func_args are
      converted to their string representation using repr() on the
      client, then restored to python objects on the server using eval(),
      and therefore only objects that can be restored server-side with
      eval() are supported.
  
  **func_kwargs : string, int, list, dictionary The keyword args to pass
      to func_name. func_kwargs are converted to their string
      representation using repr() on the client, then restored to python
      objects on the server using eval(), and therefore only objects that
      can be restored server-side with eval() are supported.
  
      result_device is reserved for use in specifying an optional GPU
      device ID to have the server transfer results to.
  
  result_device : int, default is None
      If specified, must be the integer ID of a GPU device to have the
      server transfer results to as one or more cupy ndarrays
  
  Returns
  -------
  result : python int, float, string, list
      The result returned by the extension
  
  Examples
  --------
  >>> from cugraph_service_client import CugraphServiceClient
  >>> client = CugraphServiceClient()
  >>> # Load the extension file containing "my_serverside_function()"
  >>> client.load_extensions("/some/server/side/dir")
  >>> result = client.call_extension(
  ... "my_serverside_function", 33, 22, "some_string")
  >>>
docstr_tok: ["Calls","an","extension","on","the","server","that","was","previously","loaded","by","a","prior","call","to","load_extensions","(",")",",","then","returns","the","result","returned","by","the","extension",".","Parameters","--","--","--","--","--","func_name",":","string","The","name","of","the","server-side","extension","function","loaded","by","a","prior","call","to","load_graph_creation_extensions","(",")",".","All","graph","creation","extension","functions","are","expected","to","return","a","new","graph",".","*","func_args",":","string",",","int",",","list",",","dictionary","(","optional",")","The","positional","args","to","pass","to","func_name",".","Note","that","func_args","are","converted","to","their","string","representation","using","repr","(",")","on","the","client",",","then","restored","to","python","objects","on","the","server","using","eval","(",")",",","and","therefore","only","objects","that","can","be","restored","server-side","with","eval","(",")","are","supported",".","*","*","func_kwargs",":","string",",","int",",","list",",","dictionary","The","keyword","args","to","pass","to","func_name",".","func_kwargs","are","converted","to","their","string","representation","using","repr","(",")","on","the","client",",","then","restored","to","python","objects","on","the","server","using","eval","(",")",",","and","therefore","only","objects","that","can","be","restored","server-side","with","eval","(",")","are","supported",".","result_device","is","reserved","for","use","in","specifying","an","optional","GPU","device","ID","to","have","the","server","transfer","results","to",".","result_device",":","int",",","default","is","None","If","specified",",","must","be","the","integer","ID","of","a","GPU","device","to","have","the","server","transfer","results","to","as","one","or","more","cupy","ndarrays","Returns","--","--","--","-","result",":","python","int",",","float",",","string",",","list","The","result","returned","by","the","extension","Examples","--","--","--","--",">",">",">","from","cugraph_service_client","import","CugraphServiceClient",">",">",">","client","=","CugraphServiceClient","(",")",">",">",">","#","Load","the","extension","file","containing","``","my_serverside_function","(",")","''",">",">",">","client.load_extensions","(","``","\/some\/server\/side\/dir","''",")",">",">",">","result","=","client.call_extension","(","...","``","my_serverside_function","''",",","33",",","22",",","``","some_string","''",")",">",">",">"]
code: def call_extension(
      self,
      func_name,
      *func_args,
      result_device=None,
      **func_kwargs,
  ):
      """
      Calls an extension on the server that was previously loaded by a prior
      call to load_extensions(), then returns the result returned by the
      extension.
  
      Parameters
      ----------
      func_name : string
          The name of the server-side extension function loaded by a prior
          call to load_graph_creation_extensions(). All graph creation
          extension functions are expected to return a new graph.
  
      *func_args : string, int, list, dictionary (optional)
          The positional args to pass to func_name. Note that func_args are
          converted to their string representation using repr() on the
          client, then restored to python objects on the server using eval(),
          and therefore only objects that can be restored server-side with
          eval() are supported.
  
      **func_kwargs : string, int, list, dictionary The keyword args to pass
          to func_name. func_kwargs are converted to their string
          representation using repr() on the client, then restored to python
          objects on the server using eval(), and therefore only objects that
          can be restored server-side with eval() are supported.
  
          result_device is reserved for use in specifying an optional GPU
          device ID to have the server transfer results to.
  
      result_device : int, default is None
          If specified, must be the integer ID of a GPU device to have the
          server transfer results to as one or more cupy ndarrays
  
      Returns
      -------
      result : python int, float, string, list
          The result returned by the extension
  
      Examples
      --------
      >>> from cugraph_service_client import CugraphServiceClient
      >>> client = CugraphServiceClient()
      >>> # Load the extension file containing "my_serverside_function()"
      >>> client.load_extensions("/some/server/side/dir")
      >>> result = client.call_extension(
      ... "my_serverside_function", 33, 22, "some_string")
      >>>
      """
      func_args_repr = repr(func_args)
      func_kwargs_repr = repr(func_kwargs)
      if result_device is not None:
          result_obj = asyncio.run(
              self.__call_extension_to_device(
                  func_name,
                  func_args_repr,
                  func_kwargs_repr,
                  result_device,
              )
          )
          # result_obj is a cupy array or tuple of cupy arrays on result_device
          return result_obj
      else:
          result_obj = self.__client.call_extension(
              func_name,
              func_args_repr,
              func_kwargs_repr,
              client_host=None,
              client_result_port=None,
          )
          # Convert the structure returned from the RPC call to a python type
          # FIXME: ValueWrapper ctor and get_py_obj are recursive and could be slow,
          # especially if Value is a list. Consider returning the Value obj as-is.
          return ValueWrapper(result_obj).get_py_obj()
  
imports: from cugraph_service_client.remote_graph_utils import import_optional, MissingModule
  import numpy
  from functools import wraps
  from collections.abc import Sequence
  import pickle
  import ucp
  import asyncio
  import threading
  from cugraph_service_client import defaults
  from cugraph_service_client.remote_graph import RemoteGraph
  from cugraph_service_client import extension_return_dtype_map
  from cugraph_service_client.types import ValueWrapper, GraphVertexEdgeID, UniformNeighborSampleResult
  from cugraph_service_client.cugraph_service_thrift import create_client
label_desc: Use image node_id 12 for calling the CugraphServiceClient obj's underlying member method code with example usage: obj.call_extension(func_name) and returns: result_obj, ValueWrapper