<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def read_hopopt(self, length, extension):
 """Read IPv6 Hop-by-Hop Options. Structure of HOPOPT header [RFC 8200]: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | . . . Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Octets Bits Name Description 0 0 hopopt.next Next Header 1 8 hopopt.length Header Extensive Length 2 16 hopopt.options Options """

        if length is None:
            length = len(self)

        _next = self._read_protos(1)
        _hlen = self._read_unpack(1)
        # _opts = self._read_fileng(_hlen*8+6)

        hopopt = dict(
            next=_next,
            length=(_hlen + 1) * 8,
        )

        options = self._read_hopopt_options(_hlen * 8 + 6)
        hopopt['options'] = options[0]      # tuple of option acronyms
        hopopt.update(options[1])           # merge option info to buffer

        length -= hopopt['length']
        hopopt['packet'] = self._read_packet(header=hopopt['length'], payload=length)

        if extension:
            self._protos = None
            return hopopt
        return self._decode_next_layer(hopopt, _next, length)