class_docstr: MicroTVM Device Session
  
  Parameters
  ----------
  config : dict
      configuration for this session (as generated by
      `tvm.micro.device.host.default_config()`, for example)
  
  Example
  --------
  .. code-block:: python
  
    c_mod = ...  # some module generated with "c" as the target
    dev_config = micro.device.arm.stm32f746xx.default_config('127.0.0.1', 6666)
    with tvm.micro.Session(dev_config) as sess:
        micro_mod = sess.create_micro_mod(c_mod)
class_docstr_tok: ["MicroTVM","Device","Session","Parameters","--","--","--","--","--","config",":","dict","configuration","for","this","session","(","as","generated","by","`","tvm.micro.device.host.default_config","(",")","`",",","for","example",")","Example","--","--","--","--","..","code-block",":",":","python","c_mod","=","...","#","some","module","generated","with","``","c","''","as","the","target","dev_config","=","micro.device.arm.stm32f746xx.default_config","(","'127.0.0.1","'",",","6666",")","with","tvm.micro.Session","(","dev_config",")","as","sess",":","micro_mod","=","sess.create_micro_mod","(","c_mod",")"]
docstr: Configure a new session.
  
  Parameters
  ----------
  transport_context_manager : ContextManager[transport.Transport]
      If given, `flasher` and `binary` should not be given. On entry, this context manager
      should establish a transport between this TVM instance and the device.
  session_name : str
      Name of the session, used for debugging.
  timeout_override : TransportTimeouts
      If given, TransportTimeouts that govern the way Receive() behaves. If not given, this is
      determined by calling has_flow_control() on the transport.
docstr_tok: ["Configure","a","new","session",".","Parameters","--","--","--","--","--","transport_context_manager",":","ContextManager","[","transport.Transport","]","If","given",",","`","flasher","`","and","`","binary","`","should","not","be","given",".","On","entry",",","this","context","manager","should","establish","a","transport","between","this","TVM","instance","and","the","device",".","session_name",":","str","Name","of","the","session",",","used","for","debugging",".","timeout_override",":","TransportTimeouts","If","given",",","TransportTimeouts","that","govern","the","way","Receive","(",")","behaves",".","If","not","given",",","this","is","determined","by","calling","has_flow_control","(",")","on","the","transport","."]
code: def __init__(
      self,
      transport_context_manager=None,
      session_name="micro-rpc",
      timeout_override=None,
  ):
      """Configure a new session.
  
      Parameters
      ----------
      transport_context_manager : ContextManager[transport.Transport]
          If given, `flasher` and `binary` should not be given. On entry, this context manager
          should establish a transport between this TVM instance and the device.
      session_name : str
          Name of the session, used for debugging.
      timeout_override : TransportTimeouts
          If given, TransportTimeouts that govern the way Receive() behaves. If not given, this is
          determined by calling has_flow_control() on the transport.
      """
      self.transport_context_manager = transport_context_manager
      self.session_name = session_name
      self.timeout_override = timeout_override
  
      self._rpc = None
      self._graph_executor = None
      self._enable_rpc_logger = False
  
      self._exit_called = False
  
imports: import json
  import logging
  import sys
  import os
  import pathlib
  import shutil
  from typing import Union
  from tvm.runtime.executor.aot_executor import AotModule
  from ..error import register_error
  from .._ffi import get_global_func, register_func
  from ..contrib import graph_executor
  from ..contrib import utils
  from ..contrib.debugger import debug_executor
  from ..rpc import RPCSession
  from .None import project
  from .transport import IoTimeoutError
  from .transport import TransportLogger
label_desc: Use image node_id 1 to create a new Session object  with example: obj = Session(transport_context_manager, session_name, timeout_override)