def METHOD_NAME(self, bodId):
    models = models_from_bodid(bodId)
    with self.getSession() as session:
        t = session.query(models[0]).limit(500).subquery('t')
        query = session.query(t).order_by(func.random()).limit(1)
        reslt = query.one()
    return reslt[0]