code: def get_fun(fun):
      '''
      Return a dict of the last function called for all minions
      '''
      log.debug('sqlite3 returner <get_fun> called fun: %s', fun)
      conn = _get_conn(ret=None)
      cur = conn.cursor()
      sql = '''SELECT s.id, s.full_ret, s.jid
              FROM salt_returns s
              JOIN ( SELECT MAX(jid) AS jid FROM salt_returns GROUP BY fun, id) max
              ON s.jid = max.jid
              WHERE s.fun = :fun
              '''
      cur.execute(sql,
                  {'fun': fun})
      data = cur.fetchall()
      ret = {}
      if data:
          # Pop the jid off the list since it is not
          # needed and I am trying to get a perfect
          # pylint score :-)
          data.pop()
          for minion, ret in data:
              ret[minion] = salt.utils.json.loads(ret)
      _close_conn(conn)
      return ref get_fun(fun):
      '''
      Return a dict of the last function called for all minions
      '''
      log.debug('sqlite3 returner <get_fun> called fun: %s', fun)
      conn = _get_conn(ret=None)
      cur = conn.cursor()
      sql = '''SELECT s.id, s.full_ret, s.jid
              FROM salt_returns s
              JOIN ( SELECT MAX(jid) AS jid FROM salt_returns GROUP BY fun, id) max
              ON s.jid = max.jid
              WHERE s.fun = :fun
              '''
      cur.execute(sql,
                  {'fun': fun})
      data = cur.fetchall()
      ret = {}
      if data:
          # Pop the jid off the list since it is not
          # needed and I am trying to get a perfect
          # pylint score :-)
          data.pop()
          for minion, ret in data:
              ret[minion] = salt.utils.json.loads(ret)
      _close_conn(conn)
      return ret
docs: Return a dict of the last function called for all minions