@classmethod<EOL><INDENT>def random(cls, engine_or_session, limit=<NUM_LIT:5>):<DEDENT>
ses, auto_close = ensure_session(engine_or_session)<EOL>result = ses.query(cls).order_by(func.random()).limit(limit).all()<EOL>if auto_close:  <EOL><INDENT>ses.close()<EOL><DEDENT>return result<EOL>
Return random ORM instance.

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

:rtype: List[ExtendedBase]