def _coltype_to_typeengine(coltype: Union[TypeEngine,
                                          VisitableType]) -> TypeEngine:
    """
    An example is simplest: if you pass in ``Integer()`` (an instance of
    :class:`TypeEngine`), you'll get ``Integer()`` back. If you pass in
    ``Integer`` (an instance of :class:`VisitableType`), you'll also get
    ``Integer()`` back. The function asserts that its return type is an
    instance of :class:`TypeEngine`.
    """
    if isinstance(coltype, VisitableType):
        coltype = coltype()
    assert isinstance(coltype, TypeEngine)
    return coltype