code: def read_var_int(self, max_size=sys.maxsize):
          
          fb = self.read_byte()
          if fb is 0:
              return fb
          if hex(fb) == '0xfd':
              value = self.read_uint16()
          elif hex(fb) == '0xfe':
              value = self.read_uint32()
          elif hex(fb) == '0xff':
              value = self.read_uint64()
          else:
              value = fb
          if value > max_size:
              raise SDKException(ErrorCode.param_err('Invalid format'))
          return int(value)
docs: Read a variable length integer from the stream.
          The NEO network protocol supports encoded storage for space saving. See: http://docs.neo.org/en-us/node/network-protocol.html#convention
  
          Args:
              max_size (int): (Optional) maximum number of bytes to read.
  
          Returns:
              int: