class_docstr: The interface class for all Project API implementations.
  
  Extend this class in your microtvm_api_server.py and implement each function defined here.
class_docstr_tok: ["The","interface","class","for","all","Project","API","implementations",".","Extend","this","class","in","your","microtvm_api_server.py","and","implement","each","function","defined","here","."]
docstr: Write data to the transport.
  
  This function should either write all bytes in `data` or raise an exception.
  
  Parameters
  ----------
  data : bytes
      The data to write over the channel.
  timeout_sec : Union[float, None]
      Number of seconds to wait for all bytes to be written before timing out. If timeout_sec
      is 0, write should attempt to service the request in a non-blocking fashion. If
      timeout_sec is None, write should block until it has written all data.
  
  Raises
  ------
  TransportClosedError :
      When the transport layer determines that the transport can no longer send or receive
      data due to an underlying I/O problem (i.e. file descriptor closed, cable removed, etc).
  
  IoTimeoutError :
      When `timeout_sec` elapses without receiving any data.
docstr_tok: ["Write","data","to","the","transport",".","This","function","should","either","write","all","bytes","in","`","data","`","or","raise","an","exception",".","Parameters","--","--","--","--","--","data",":","bytes","The","data","to","write","over","the","channel",".","timeout_sec",":","Union","[","float",",","None","]","Number","of","seconds","to","wait","for","all","bytes","to","be","written","before","timing","out",".","If","timeout_sec","is","0",",","write","should","attempt","to","service","the","request","in","a","non-blocking","fashion",".","If","timeout_sec","is","None",",","write","should","block","until","it","has","written","all","data",".","Raises","--","--","--","TransportClosedError",":","When","the","transport","layer","determines","that","the","transport","can","no","longer","send","or","receive","data","due","to","an","underlying","I\/O","problem","(","i.e",".","file","descriptor","closed",",","cable","removed",",","etc",")",".","IoTimeoutError",":","When","`","timeout_sec","`","elapses","without","receiving","any","data","."]
code: def write_transport(self, data: bytes, timeout_sec: float):
      """Write data to the transport.
  
      This function should either write all bytes in `data` or raise an exception.
  
      Parameters
      ----------
      data : bytes
          The data to write over the channel.
      timeout_sec : Union[float, None]
          Number of seconds to wait for all bytes to be written before timing out. If timeout_sec
          is 0, write should attempt to service the request in a non-blocking fashion. If
          timeout_sec is None, write should block until it has written all data.
  
      Raises
      ------
      TransportClosedError :
          When the transport layer determines that the transport can no longer send or receive
          data due to an underlying I/O problem (i.e. file descriptor closed, cable removed, etc).
  
      IoTimeoutError :
          When `timeout_sec` elapses without receiving any data.
      """
      raise NotImplementedError()
  
imports: import abc
  import argparse
  import base64
  import collections
  import enum
  import io
  import json
  import logging
  import os
  import pathlib
  import re
  import select
  import sys
  import time
  import traceback
  import typing
label_desc: Use image node_id 8 for calling the ProjectAPIHandler obj's underlying member method code with example usage: obj.write_transport(data, timeout_sec) without return types