def index(self, value, start=<NUM_LIT:0>, stop=None):
if start is not None and start < <NUM_LIT:0>:<EOL><INDENT>start = max(len(self) + start, <NUM_LIT:0>)<EOL><DEDENT>if stop is not None and stop < <NUM_LIT:0>:<EOL><INDENT>stop += len(self)<EOL><DEDENT>try:<EOL><INDENT>if not isinstance(start, numbers.Integral):<EOL><INDENT>start = self.index(start)<EOL><DEDENT>if not isinstance(stop, numbers.Integral):<EOL><INDENT>stop = self.index(stop)<EOL><DEDENT><DEDENT>except IndexNotFound:<EOL><INDENT>raise IntError('<STR_LIT>') from None<EOL><DEDENT>from pcapkit.protocols.protocol import Protocol<EOL>try:<EOL><INDENT>flag = issubclass(value, Protocol)<EOL><DEDENT>except TypeError:<EOL><INDENT>flag = issubclass(type(value), Protocol)<EOL><DEDENT>if flag or isinstance(value, Protocol):<EOL><INDENT>value = value.__index__()<EOL>if isinstance(value, tuple):<EOL><INDENT>value = r'<STR_LIT:|>'.join(value)<EOL><DEDENT><DEDENT>try:<EOL><INDENT>for index, data in enumerate(self.__data__[start:stop]):<EOL><INDENT>if re.fullmatch(value, data, re.IGNORECASE):<EOL><INDENT>return index<EOL><DEDENT><DEDENT><DEDENT>except Exception:<EOL><INDENT>raise IndexNotFound(f'<STR_LIT>')<EOL><DEDENT>
S.index(value, [start, [stop]]) -> integer -- return first index of value.
           Raises ValueError if the value is not present.

           Supporting start and stop arguments is optional, but
           recommended.