def parse_file(filename):
    """
    Parses a file and counts the occurrences of the word "pride"
    Args:
        filename: The file to be parsed
    Returns:
        The number of occurrences
    """
    count = 0

    # this is a super cool way to open a file, so it
    # will automatically be closed / cleaned up when needed
    with open(filename, encoding="utf8") as f:
        # go through each line in the file, one by one
        for line in f:
            # split the line into words based on space
            # (the default delimiter)
            words = line.split()

            # go through each word and see if it matches
            # (yes there are more clever ways to do this...)
            for word in words:
                if word == "pride":
                    count += 1

    return count