from typing import List


def assert_no_unnecessary_prefixes(docstring: List[str]) -> List[str]:
    """
    Make sure that lines that contain :param or :return or :raises are prefixed with ": "
    and there are no unnecessary prefixes, only whitespace is allowed before the prefix

    :param docstring: list of lines in docstring
    :return: list of lines in docstring
    """
    prefixes = [":param", ":return", ":raises"]
    for i in range(len(docstring)):
        line = docstring[i]
        # check if one prefixes is in line
        for prefix in prefixes:
            index = line.find(prefix)
            if index != -1:
                # make sure there is only whitespace before prefix
                # replace all characters before prefix with whitespace
                docstring[i] = " " * index + line[index:]
                break

    return docstring