class_docstr: MicroTVM AutoTVM Module Loader
  
  Parameters
  ----------
  template_project_dir : Union[os.PathLike, str]
      project template path
  
  project_options : dict
      project generation option
  
  project_dir: str
      if use_existing is False: The path to save the generated microTVM Project.
      if use_existing is True: The path to a generated microTVM Project for debugging.
  
  use_existing: bool
      skips the project generation and opens transport to the project at the project_dir address.
class_docstr_tok: ["MicroTVM","AutoTVM","Module","Loader","Parameters","--","--","--","--","--","template_project_dir",":","Union","[","os.PathLike",",","str","]","project","template","path","project_options",":","dict","project","generation","option","project_dir",":","str","if","use_existing","is","False",":","The","path","to","save","the","generated","microTVM","Project",".","if","use_existing","is","True",":","The","path","to","a","generated","microTVM","Project","for","debugging",".","use_existing",":","bool","skips","the","project","generation","and","opens","transport","to","the","project","at","the","project_dir","address","."]
code: def __call__(self, remote_kw, build_result):
      with open(build_result.filename, "rb") as build_file:
          build_result_bin = build_file.read()
  
      # In case we are tuning on multiple physical boards (with Meta-schedule), the tracker
      # device_key is the serial_number of the board that wil be used in generating micro session.
      # For CRT projects, and in cases that the serial number is not provided
      # (including tuning with AutoTVM), the serial number field doesn't change.
      if (
          "board" in self._project_options
          and "$local$device" not in remote_kw["device_key"]
      ):
          self._project_options["serial_number"] = remote_kw[
              "device_key"
          ]
  
      tracker = _rpc.connect_tracker(
          remote_kw["host"], remote_kw["port"]
      )
      remote = tracker.request(
          remote_kw["device_key"],
          priority=remote_kw["priority"],
          session_timeout=remote_kw["timeout"],
          session_constructor_args=[
              "tvm.micro.compile_and_create_micro_session",
              build_result_bin,
              self._template_project_dir,
              json.dumps(self._project_options),
              self._project_dir,
              self._use_existing,
          ],
      )
      system_lib = remote.get_function("runtime.SystemLib")()
      yield remote, system_lib
  
imports: import json
  import logging
  import os
  import contextlib
  import enum
  from pathlib import Path
  import shutil
  from typing import Union
  from .._ffi import libinfo
  from ..None import rpc
label_desc: Use image node_id 2 for calling the AutoTvmModuleLoader obj's underlying member method code with example usage: obj.__call__(remote_kw, build_result) without return types