class_docstr: Hexagon Device Session
  
  Parameters
  ----------
  remote_workspace : Union[str, pathlib.Path]
      Remote workspace path
  
  rpc_tracker : tuple(str, int)
      RPC tracker host and port number.
  
  rpc_server_key : str
      RPC server key on remote device.
  
  serial_number : str
      Device serial number. `simulator` used for hexagon simulator.
  
  session_name : str
      Hexagon RPC session name.
  
  remote_stack_size_bytes : int
      The stack size of the remote device, to be passed to
      tvm.contrib.hexagon.create_hexagon_session.
  
  rpc_receive_buffer_size_bytes : int
      RPC receive buffer size in bytes.
class_docstr_tok: ["Hexagon","Device","Session","Parameters","--","--","--","--","--","remote_workspace",":","Union","[","str",",","pathlib.Path","]","Remote","workspace","path","rpc_tracker",":","tuple","(","str",",","int",")","RPC","tracker","host","and","port","number",".","rpc_server_key",":","str","RPC","server","key","on","remote","device",".","serial_number",":","str","Device","serial","number",".","`","simulator","`","used","for","hexagon","simulator",".","session_name",":","str","Hexagon","RPC","session","name",".","remote_stack_size_bytes",":","int","The","stack","size","of","the","remote","device",",","to","be","passed","to","tvm.contrib.hexagon.create_hexagon_session",".","rpc_receive_buffer_size_bytes",":","int","RPC","receive","buffer","size","in","bytes","."]
docstr: Create a local GraphModule which consumes a remote libmod.
  
  The session must be established (via __enter__) prior to
  calling this function.
  
  Parameters
  ----------
  
  module : GraphExecutorFactoryModule
  
      The graph executor module to upload to the remote and load.
      This will typically be the output of `tvm.relay.build`,
      when passing `executor=Executor("graph")`.
  
  Returns
  -------
  GraphModule :
      Runtime graph module that can be used to execute the graph.
docstr_tok: ["Create","a","local","GraphModule","which","consumes","a","remote","libmod",".","The","session","must","be","established","(","via","__enter__",")","prior","to","calling","this","function",".","Parameters","--","--","--","--","--","module",":","GraphExecutorFactoryModule","The","graph","executor","module","to","upload","to","the","remote","and","load",".","This","will","typically","be","the","output","of","`","tvm.relay.build","`",",","when","passing","`","executor=Executor","(","``","graph","''",")","`",".","Returns","--","--","--","-","GraphModule",":","Runtime","graph","module","that","can","be","used","to","execute","the","graph","."]
code: def _graph_executor_from_factory(
      self,
      module: Union[str, pathlib.Path, GraphExecutorFactoryModule],
  ):
      """Create a local GraphModule which consumes a remote libmod.
  
      The session must be established (via __enter__) prior to
      calling this function.
  
      Parameters
      ----------
  
      module : GraphExecutorFactoryModule
  
          The graph executor module to upload to the remote and load.
          This will typically be the output of `tvm.relay.build`,
          when passing `executor=Executor("graph")`.
  
      Returns
      -------
      GraphModule :
          Runtime graph module that can be used to execute the graph.
  
      """
      return self.get_graph_executor(
          module.get_graph_json(), module.get_lib()
      )
  
imports: import os
  import pathlib
  import tempfile
  from typing import Union
  import tvm
  from tvm import rpc
  import tvm.contrib.hexagon
  from tvm.relay.backend.executor_factory import ExecutorFactoryModule, AOTExecutorFactoryModule, GraphExecutorFactoryModule
  from .tools import export_module, HEXAGON_SIMULATOR_NAME
label_desc: Use image node_id 14 for calling the Session obj's underlying member method code with example usage: obj._graph_executor_from_factory(module) and returns: self