def render_hunspell_word_error(
    data,
    fields=["filename", "word", "line_number", "word_line_index"],
    sep=":",
):
    """Renders a mispelled word data dictionary.

    This function allows a convenient way to render each mispelled word data
    dictionary as a string, that could be useful to print in the context of
    spell checkers command line interfaces.

    Args:
        data (dict): Mispelled word data, as it is yielded by the method
            :py:meth:`hunspellcheck.HunspellChecker.check`.
        fields (list): List of fields to include in the response.
        sep (str): Separator string between each field value.

    Returns:
        str: Mispelled word data as a string.
    """
    values = []
    for field in fields:
        value = data.get(field)
        if value is not None:
            values.append(str(value))
    return (sep).join(values)