<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_mode_route(self, size, kind):
 """Read options with route data. Positional arguments: * size - int, length of option * kind - int, 7/131/137 (RR/LSR/SSR) Returns: * dict -- extracted option with route data Structure of these options: * [RFC 791] Loose Source Route +--------+--------+--------+---------//--------+ |10000011| length | pointer| route data | +--------+--------+--------+---------//--------+ * [RFC 791] Strict Source Route +--------+--------+--------+---------//--------+ |10001001| length | pointer| route data | +--------+--------+--------+---------//--------+ * [RFC 791] Record Route +--------+--------+--------+---------//--------+ |00000111| length | pointer| route data | +--------+--------+--------+---------//--------+ Octets Bits Name Description 0 0 ip.opt.kind Kind (7/131/137) 0 0 ip.opt.type.copy Copied Flag (0) 0 1 ip.opt.type.class Option Class (0/1) 0 3 ip.opt.type.number Option Number (3/7/9) 1 8 ip.opt.length Length 2 16 ip.opt.pointer Pointer (≥4) 3 24 ip.opt.data Route Data """

        if size < 3 or (size - 3) % 4 != 0:
            raise ProtocolError(f'{self.alias}: [Optno {kind}] invalid format')

        _rptr = self._read_unpack(1)

        if _rptr < 4:
            raise ProtocolError(f'{self.alias}: [Optno {kind}] invalid format')

        data = dict(
            kind=kind,
            type=self._read_opt_type(kind),
            length=size,
            pointer=_rptr,
        )

        counter = 4
        address = list()
        endpoint = min(_rptr, size)
        while counter < endpoint:
            counter += 4
            address.append(self._read_ipv4_addr())
        data['ip'] = address or None

        return data