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."""
    assert isinstance(text, str), 'text is not a string: {}'.format(text)
    assert isinstance(pattern, str), 'pattern is not a string: {}'.format(text)

    # Time Complexity: O(n*m)
    # Space Complexity: O(1)



    # list of indexes that indicate the start of pattern
    pattern_starting_indexes = list()

    if pattern == '':
        for index in range(0, len(text)):
            pattern_starting_indexes.append(index)
        return pattern_starting_indexes

    for index, letter in enumerate(text):
        if letter == pattern[0]:
            # Compare the slice of text from the current index to the len of pattern
            if pattern == text[index: (index + len(pattern))]:
                pattern_starting_indexes.append(index) # pattern == slice
            # If comparion is not the same, then continue the iteration

    # Pattern was not found during the entire iteration
    return pattern_starting_indexes