

def get_fun(fun):
    '\n    Return a dict of the last function called for all minions\n    '
    with _get_serv(ret=None, commit=True) as cur:
        sql = 'SELECT s.id,s.jid, s.full_ret\n                FROM `salt_returns` s\n                JOIN ( SELECT MAX(`jid`) as jid\n                    from `salt_returns` GROUP BY fun, id) max\n                ON s.jid = max.jid\n                WHERE s.fun = %s\n                '
        cur.execute(sql, (fun,))
        data = cur.fetchall()
        ret = {
            
        }
        if data:
            for (minion, _, full_ret) in data:
                ret[minion] = json.loads(full_ret)
        return ret

dataset/ETHPy150Open saltstack/salt/salt/returners/mysql.py get_fun/original