def fail_unknown_dialect(compiler: "SQLCompiler", task: str) -> None:
    """
    Raise :exc:`NotImplementedError` in relation to a dialect for which a
    function hasn't been implemented (with a helpful error message).
    """
    raise NotImplementedError(
        "Don't know how to {task} on dialect {dialect!r}. "
        "(Check also: if you printed the SQL before it was bound to an "
        "engine, you will be trying to use a dialect like StrSQLCompiler, "
        "which could be a reason for failure.)".format(
            task=task,
            dialect=compiler.dialect
        )
    )