def get_preparer(mixed: Union[SQLCompiler, Engine,
                              Dialect]) -> IdentifierPreparer:
    """
    Returns the SQLAlchemy :class:`IdentifierPreparer` in use for the dialect
    being used.

    Args:
        mixed: an SQLAlchemy :class:`SQLCompiler`, :class:`Engine`, or
            :class:`Dialect` object

    Returns: an :class:`IdentifierPreparer`

    """
    dialect = get_dialect(mixed)
    # noinspection PyUnresolvedReferences
    return dialect.preparer(dialect)