def METHOD_NAME(
    self, stream: str, pattern: str, index_attr: str
) -> Iterable[str]:
    """
    Generic "search for pattern in stream, using index" behavior.
    Used here and in some subclasses that want to track multiple patterns
    concurrently.
    :param str stream: The same data passed to ``submit``.
    :param str pattern: The pattern to search for.
    :param str index_attr: The name of the index attribute to use.
    :returns: An iterable of string matches.
    .. versionadded:: 1.0
    """
    # NOTE: generifies scanning so it can be used to scan for >1 pattern at
    # once, e.g. in FailingResponder.
    # Only look at stream contents we haven't seen yet, to avoid dupes.
    index = getattr(self, index_attr)
    new = stream[index:]
    # Search, across lines if necessary
    matches = re.findall(pattern, new, re.S)
    # Update seek index if we've matched
    if matches:
        setattr(self, index_attr, index + len(new))
    return matches