code: def cmd_iter(tgt,
               fun,
               arg=(),
               timeout=None,
               tgt_type='glob',
               ret='',
               kwarg=None,
               ssh=False,
               **kwargs):
      '''
      .. versionchanged:: 2017.7.0
          The ``expr_form`` argument has been renamed to ``tgt_type``, earlier
          releases must use ``expr_form``.
  
      Assuming this minion is a master, execute a salt command
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' saltutil.cmd_iter
      '''
      if ssh:
          client = salt.client.ssh.client.SSHClient(__opts__['conf_file'])
      else:
          client = salt.client.get_local_client(__opts__['conf_file'])
      for ret in client.cmd_iter(
              tgt,
              fun,
              arg,
              timeout,
              tgt_type,
              ret,
              kwarg,
              **kwargs):
          yield ref cmd_iter(tgt,
               fun,
               arg=(),
               timeout=None,
               tgt_type='glob',
               ret='',
               kwarg=None,
               ssh=False,
               **kwargs):
      '''
      .. versionchanged:: 2017.7.0
          The ``expr_form`` argument has been renamed to ``tgt_type``, earlier
          releases must use ``expr_form``.
  
      Assuming this minion is a master, execute a salt command
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' saltutil.cmd_iter
      '''
      if ssh:
          client = salt.client.ssh.client.SSHClient(__opts__['conf_file'])
      else:
          client = salt.client.get_local_client(__opts__['conf_file'])
      for ret in client.cmd_iter(
              tgt,
              fun,
              arg,
              timeout,
              tgt_type,
              ret,
              kwarg,
              **kwargs):
          yield ret
docs: .. versionchanged:: 2017.7.0
          The ``expr_form`` argument has been renamed to ``tgt_type``, earlier
          releases must use ``expr_form``.
  
      Assuming this minion is a master, execute a salt command
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' saltutil.cmd_iter