def iter_fragments(string, is_match=None):
    """Yield fragments of `string` that are of a desired form as dictated by `is_match`

    Parameters
    ----------
    string: String
        A string containing fragments, which, when passed to `is_match` return True
    is_match: Callable, or None, default=lambda _: False
        Callable given a single string input that is a fragment of `string`, starting at any index.
        Expected to return boolean, which is truthy when the given fragment is of the desired form

    Yields
    ------
    String
        Fragment of `string` starting at an index and continuing to the end, for which `is_match`
        returned a truthy value
    Int
        The index at which the aforementioned string fragment begins"""
    is_match = is_match or (lambda _: False)
    for i in range(len(string)):
        if is_match(string[i:]):
            yield string[i:], i
