from typing import Optional


def prepare_error_message(message: str, error_context: Optional[str] = None) -> str:
    """
    If `error_context` is not None prepend that to error message.
    """
    if error_context is not None:
        return error_context + ": " + message
    else:
        return message