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","."]
code: def __init__(
      self,
      remote_workspace: Union[str, pathlib.Path],
      rpc_tracker: tuple,
      rpc_server_key: str,
      serial_number: str,
      session_name: str = "hexagon-rpc",
      remote_stack_size_bytes: int = 256
      * 1024,  # Min size for main thread in QuRT/sim
      rpc_receive_buffer_size_bytes: int = 256
      * 1024
      * 1024,  # Size for passing hexagon tests
  ):
      self._workspace = str(remote_workspace)
      self._rpc_tracker = rpc_tracker
      self._rpc_server_key = rpc_server_key
      self._serial_number = serial_number
      self._session_name: str = session_name
      self._remote_stack_size_bytes: int = remote_stack_size_bytes
      self._rpc_receive_buffer_size_bytes: int = (
          rpc_receive_buffer_size_bytes
      )
      self._rpc = None
      self._requires_cpu_device = False
      self._device = None
  
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 1 to create a new Session object  with example: obj = Session(remote_workspace, rpc_tracker, rpc_server_key, serial_number, session_name, remote_stack_size_bytes, rpc_receive_buffer_size_bytes)