Return random ORM instance.

        :type engine_or_session: Union[Engine, Session]
        :type limit: int

        :rtype: List[ExtendedBase]

def random(cls, engine_or_session, limit=5):
        """
        Return random ORM instance.

        :type engine_or_session: Union[Engine, Session]
        :type limit: int

        :rtype: List[ExtendedBase]
        """
        ses, auto_close = ensure_session(engine_or_session)
        result = ses.query(cls).order_by(func.random()).limit(limit).all()
        if auto_close:  # pragma: no cover
            ses.close()
        return result