def cmd(
            self,
            tgt,
            fun,
            arg=(),
            timeout=None,
            expr_form='glob',
            ret='',
            jid='',
            kwarg=None,
            **kwargs):
        arg = salt.utils.args.condition_input(arg, kwarg)
        pub_data = self.run_job(tgt,
                                fun,
                                arg,
                                expr_form,
                                ret,
                                timeout,
                                jid,
                                **kwargs)

        if not pub_data:
            return pub_data

        ret = {}
        for fn_ret in self.get_cli_event_returns(
                pub_data['jid'],
                pub_data['minions'],
                self._get_timeout(timeout),
                tgt,
                expr_form,
                **kwargs):

            if fn_ret:
                for mid, data in six.iteritems(fn_ret):
                    ret[mid] = data.get('ret', {})

        return ret
Synchronously execute a command on targeted minions
dataset/ETHPy150Open saltstack/salt/salt/client/__init__.py/LocalClient.cmd