class_docstr: Tracker client session.
  
  Parameters
  ----------
  addr : tuple
      The address tuple
class_docstr_tok: ["Tracker","client","session",".","Parameters","--","--","--","--","--","addr",":","tuple","The","address","tuple"]
docstr: Request a new connection from the tracker.
  
  Parameters
  ----------
  key : str
      The type key of the device.
  
  priority : int, optional
      The priority of the request.
  
  session_timeout : float, optional
      The duration of the session, allows server to kill
      the connection when duration is longer than this value.
      When duration is zero, it means the request must always be kept alive.
  
  max_retry : int, optional
      Maximum number of times to retry before give up.
  
  session_constructor_args : list, optional
      List of additional arguments to passed as the remote session constructor.
      The first element of the list is always a string specifying the name of
      the session constructor, the following args are the positional args to that function.
docstr_tok: ["Request","a","new","connection","from","the","tracker",".","Parameters","--","--","--","--","--","key",":","str","The","type","key","of","the","device",".","priority",":","int",",","optional","The","priority","of","the","request",".","session_timeout",":","float",",","optional","The","duration","of","the","session",",","allows","server","to","kill","the","connection","when","duration","is","longer","than","this","value",".","When","duration","is","zero",",","it","means","the","request","must","always","be","kept","alive",".","max_retry",":","int",",","optional","Maximum","number","of","times","to","retry","before","give","up",".","session_constructor_args",":","list",",","optional","List","of","additional","arguments","to","passed","as","the","remote","session","constructor",".","The","first","element","of","the","list","is","always","a","string","specifying","the","name","of","the","session","constructor",",","the","following","args","are","the","positional","args","to","that","function","."]
code: def request(
      self,
      key,
      priority=1,
      session_timeout=0,
      max_retry=5,
      session_constructor_args=None,
  ):
      """Request a new connection from the tracker.
  
      Parameters
      ----------
      key : str
          The type key of the device.
  
      priority : int, optional
          The priority of the request.
  
      session_timeout : float, optional
          The duration of the session, allows server to kill
          the connection when duration is longer than this value.
          When duration is zero, it means the request must always be kept alive.
  
      max_retry : int, optional
          Maximum number of times to retry before give up.
  
      session_constructor_args : list, optional
          List of additional arguments to passed as the remote session constructor.
          The first element of the list is always a string specifying the name of
          the session constructor, the following args are the positional args to that function.
      """
      last_err = None
      for _ in range(max_retry):
          try:
              if self._sock is None:
                  self._connect()
              base.sendjson(
                  self._sock,
                  [base.TrackerCode.REQUEST, key, "", priority],
              )
              value = base.recvjson(self._sock)
              if value[0] != base.TrackerCode.SUCCESS:
                  raise RuntimeError(
                      f"Invalid return value {str(value)}"
                  )
              url, port, matchkey = value[1]
              return connect(
                  url,
                  port,
                  matchkey,
                  session_timeout,
                  session_constructor_args=session_constructor_args,
              )
          except socket.error as err:
              self.close()
              last_err = err
          except TVMError as err:
              last_err = err
      raise RuntimeError(
          f"Cannot request {key} after {max_retry} retry, last_error:{str(last_err)}"
      )
  
imports: import os
  import socket
  import stat
  import struct
  import time
  import tvm._ffi
  from tvm._ffi.base import TVMError
  from tvm.contrib import utils
  from tvm.runtime import ndarray
  from tvm._ffi.runtime_ctypes import Device
  from .None import _ffi_api, base, server
label_desc: Use image node_id 7 for calling the TrackerSession obj's underlying member method code with example usage: obj.request(key, priority, session_timeout, max_retry, session_constructor_args) and returns: connect