Python implementation for contains pattern in text
PEP8 and readability


You have a few great docstrings, there is no need for block-comments and docstrings.
In contains you have this assert isinstance(text, str) but don't use it.


Code changes

Your contains(text, pattern) could be a lot more simplified. Because contains checks whether a pattern occurs in text and returns a boolean indicating . 

def contains(text, pattern):
    """Return a boolean indicating whether pattern occurs in text."""
    # If our pattern index is equal to our pattern length 
    # then we found a match and we can return True
    # If our current text character is not our pattern character 
    # and if we were checking for a pattern
    # If we have not found our pattern then we return False

    text_index = 0
    pattern_index = 0

    text_length = len(text)
    pattern_length = len(pattern)

    while text_index &lt; text_length:  
        if text[text_index] == pattern[pattern_index]:
            pattern_index += 1
        elif pattern_index &gt; 0:
            pattern_index = 0
            continue
        if pattern_index + 1 &gt; pattern_length:
            return True
        text_index += 1
    return False