def find_all_indexes(text, pattern):
    """
    Return a list of starting indexes of all occurrences of pattern in text,
    or an empty list if not found.
    Runtime: O(n)
    Condition: Iterates over the text to find the pattern
    """
    # start = time.time()
    
    
    assert isinstance(text, str), 'text is not a string: {}'.format(text)
    assert isinstance(pattern, str), 'pattern is not a string: {}'.format(text)

    # Empty list to store the indexes of the pattern
    pattern_indexes = []

    # Appends to the the pattern_indexes if the pattern is empty
    if pattern == '':
        for index in range(0, len(text)):
            pattern_indexes.append(index)
        # finish = time.time() - start
        # print(finish)
        return pattern_indexes

    # Iterates through and appends the index if the pattern finds the match for all indexes
    for index, _ in enumerate(text):
        if pattern == text[index: (index + len(pattern))]:
                pattern_indexes.append(index)
    # finish = time.time() - start
    # print(finish)
    return pattern_indexes