class_docstr: The abstract Transport class used for micro TVM.
class_docstr_tok: ["The","abstract","Transport","class","used","for","micro","TVM","."]
docstr: Read up to n bytes from the transport.
  
  Parameters
  ----------
  n : int
      Maximum number of bytes to read from the transport.
  timeout_sec : Union[float, None]
      Number of seconds to wait for all `n` bytes to be received before timing out. The
      transport can wait additional time to account for transport latency or bandwidth
      limitations based on the selected configuration and number of bytes being received. If
      timeout_sec is 0, read should attempt to service the request in a non-blocking fashion.
      If timeout_sec is None, read should block until at least 1 byte of data can be returned.
  
  Returns
  -------
  bytes :
      Data read from the channel. Less than `n` bytes may be returned, but 0 bytes should
      never be returned. If returning less than `n` bytes, the full timeout_sec, plus any
      internally-added timeout, should be waited. If a timeout or transport error occurs,
      an exception should be raised rather than simply returning empty bytes.
  
  
  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: ["Read","up","to","n","bytes","from","the","transport",".","Parameters","--","--","--","--","--","n",":","int","Maximum","number","of","bytes","to","read","from","the","transport",".","timeout_sec",":","Union","[","float",",","None","]","Number","of","seconds","to","wait","for","all","`","n","`","bytes","to","be","received","before","timing","out",".","The","transport","can","wait","additional","time","to","account","for","transport","latency","or","bandwidth","limitations","based","on","the","selected","configuration","and","number","of","bytes","being","received",".","If","timeout_sec","is","0",",","read","should","attempt","to","service","the","request","in","a","non-blocking","fashion",".","If","timeout_sec","is","None",",","read","should","block","until","at","least","1","byte","of","data","can","be","returned",".","Returns","--","--","--","-","bytes",":","Data","read","from","the","channel",".","Less","than","`","n","`","bytes","may","be","returned",",","but","0","bytes","should","never","be","returned",".","If","returning","less","than","`","n","`","bytes",",","the","full","timeout_sec",",","plus","any","internally-added","timeout",",","should","be","waited",".","If","a","timeout","or","transport","error","occurs",",","an","exception","should","be","raised","rather","than","simply","returning","empty","bytes",".","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 read(self, n, timeout_sec):
      """Read up to n bytes from the transport.
  
      Parameters
      ----------
      n : int
          Maximum number of bytes to read from the transport.
      timeout_sec : Union[float, None]
          Number of seconds to wait for all `n` bytes to be received before timing out. The
          transport can wait additional time to account for transport latency or bandwidth
          limitations based on the selected configuration and number of bytes being received. If
          timeout_sec is 0, read should attempt to service the request in a non-blocking fashion.
          If timeout_sec is None, read should block until at least 1 byte of data can be returned.
  
      Returns
      -------
      bytes :
          Data read from the channel. Less than `n` bytes may be returned, but 0 bytes should
          never be returned. If returning less than `n` bytes, the full timeout_sec, plus any
          internally-added timeout, should be waited. If a timeout or transport error occurs,
          an exception should be raised rather than simply returning empty bytes.
  
  
      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 logging
  import string
  import typing
  from .project_api.server import IoTimeoutError, TransportTimeouts
  from .project_api.server import TransportClosedError
label_desc: Use image node_id 6 for calling the Transport obj's underlying member method code with example usage: obj.read(n, timeout_sec) without return types