def _read_mode_ts(self, size, kind):
if size > <NUM_LIT> or size < <NUM_LIT:4>:<EOL><INDENT>raise ProtocolError(f'<STR_LIT>')<EOL><DEDENT>_tptr = self._read_unpack(<NUM_LIT:1>)<EOL>_oflg = self._read_binary(<NUM_LIT:1>)<EOL>_oflw = int(_oflg[:<NUM_LIT:4>], base=<NUM_LIT:2>)<EOL>_flag = int(_oflg[<NUM_LIT:4>:], base=<NUM_LIT:2>)<EOL>if _tptr < <NUM_LIT:5>:<EOL><INDENT>raise ProtocolError(f'<STR_LIT>')<EOL><DEDENT>data = dict(<EOL>kind=kind,<EOL>type=self._read_opt_type(kind),<EOL>length=size,<EOL>pointer=_tptr,<EOL>overflow=_oflw,<EOL>flag=_flag,<EOL>)<EOL>endpoint = min(_tptr, size)<EOL>if _flag == <NUM_LIT:0>:<EOL><INDENT>if (size - <NUM_LIT:4>) % <NUM_LIT:4> != <NUM_LIT:0>:<EOL><INDENT>raise ProtocolError(f'<STR_LIT>')<EOL><DEDENT>counter = <NUM_LIT:5><EOL>timestamp = list()<EOL>while counter < endpoint:<EOL><INDENT>counter += <NUM_LIT:4><EOL>time = self._read_unpack(<NUM_LIT:4>, lilendian=True)<EOL>timestamp.append(datetime.datetime.fromtimestamp(time))<EOL><DEDENT>data['<STR_LIT>'] = timestamp or None<EOL><DEDENT>elif _flag == <NUM_LIT:1> or _flag == <NUM_LIT:3>:<EOL><INDENT>if (size - <NUM_LIT:4>) % <NUM_LIT:8> != <NUM_LIT:0>:<EOL><INDENT>raise ProtocolError(f'<STR_LIT>')<EOL><DEDENT>counter = <NUM_LIT:5><EOL>ipaddress = list()<EOL>timestamp = list()<EOL>while counter < endpoint:<EOL><INDENT>counter += <NUM_LIT:8><EOL>ipaddress.append(self._read_ipv4_addr())<EOL>time = self._read_unpack(<NUM_LIT:4>, lilendian=True)<EOL>timestamp.append(datetime.datetime.fromtimestamp(time))<EOL><DEDENT>data['<STR_LIT>'] = ipaddress or None<EOL>data['<STR_LIT>'] = timestamp or None<EOL><DEDENT>else:<EOL><INDENT>data['<STR_LIT:data>'] = self._read_fileng(size - <NUM_LIT:4>) or None<EOL><DEDENT>return data<EOL>
Read Time Stamp option.

        Positional arguments:
            * size - int, length of option
            * kind - int, 68 (TS)

        Returns:
            * dict -- extracted Time Stamp (TS) option

        Structure of Timestamp (TS) option [RFC 791]:
            +--------+--------+--------+--------+
            |01000100| length | pointer|oflw|flg|
            +--------+--------+--------+--------+
            |         internet address          |
            +--------+--------+--------+--------+
            |             timestamp             |
            +--------+--------+--------+--------+
            |                 .                 |
                              .
                              .

            Octets      Bits        Name                    Description
              0           0     ip.ts.kind              Kind (25)
              0           0     ip.ts.type.copy         Copied Flag (0)
              0           1     ip.ts.type.class        Option Class (0)
              0           3     ip.ts.type.number       Option Number (25)
              1           8     ip.ts.length            Length (≤40)
              2          16     ip.ts.pointer           Pointer (≥5)
              3          24     ip.ts.overflow          Overflow Octets
              3          28     ip.ts.flag              Flag
              4          32     ip.ts.ip                Internet Address
              8          64     ip.ts.timestamp         Timestamp