def trace(self, packet, *, _check=True, _output=False):
self._newflg = True<EOL>if _check:<EOL><INDENT>pkt_check(packet)<EOL><DEDENT>info = Info(packet)<EOL>BUFID = tuple(sorted([str(info.src), str(info.srcport),    <EOL>str(info.dst), str(info.dstport)]))  <EOL>FIN = info.fin        <EOL>if BUFID not in self._buffer:<EOL><INDENT>label = f'<STR_LIT>'  <EOL>self._buffer[BUFID] = dict(<EOL>fpout=self._foutio(f'<STR_LIT>',<EOL>protocol=info.protocol),  <EOL>index=list(),<EOL>label=label,<EOL>)<EOL><DEDENT>self._buffer[BUFID]['<STR_LIT:index>'].append(info.index)  <EOL>fpout = self._buffer[BUFID]['<STR_LIT>']<EOL>label = self._buffer[BUFID]['<STR_LIT:label>']<EOL>if FIN:<EOL><INDENT>buf = self._buffer.pop(BUFID)<EOL>if self._fdpext:<EOL><INDENT>buf['<STR_LIT>'] = f'<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>del buf['<STR_LIT>']<EOL><DEDENT>buf['<STR_LIT:index>'] = tuple(buf['<STR_LIT:index>'])<EOL>self._stream.append(Info(buf))<EOL><DEDENT>return fpout if _output else label<EOL>
Trace packets.

        Positional arguments:
            * packet -- dict, a flow packet

        Keyword arguments:
            * _check -- bool, flag if run validations
            * _output -- bool, flag if has formatted dumper