parameters: (f)
docstring: r"""
      >>> import io
      >>> read_uint2(io.BytesIO(b'\xff\x00'))
      255
      >>> read_uint2(io.BytesIO(b'\xff\xff'))
      65535
docstring_summary: r"""
      >>> import io
      >>> read_uint2(io.BytesIO(b'\xff\x00'))
      255
      >>> read_uint2(io.BytesIO(b'\xff\xff'))
      65535
docstring_tokens: r >>> import io >>> read_uint2 ( io . BytesIO ( b \ xff \ x00 )) 255 >>> read_uint2 ( io . BytesIO ( b \ xff \ xff )) 65535
function: def read_uint2(f):
      r"""
      >>> import io
      >>> read_uint2(io.BytesIO(b'\xff\x00'))
      255
      >>> read_uint2(io.BytesIO(b'\xff\xff'))
      65535
      """
  
      data = f.read(2)
      if len(data) == 2:
          return _unpack("<H", data)[0]
      raise ValueError("not enough data in stream to read uint2")
function_tokens: def read_uint2 ( f ) : data = f . read ( 2 ) if len ( data ) == 2 : return _unpack ( "<H" , data ) [ 0 ] raise ValueError ( "not enough data in stream to read uint2" )