def METHOD_NAME():
    """
    Kill and restart the salt minion.
    The configuration key ``minion_restart_command`` is an argv list for the
    command to restart the minion.  If ``minion_restart_command`` is not
    specified or empty then the ``argv`` of the current process will be used.
    if the configuration value ``minion_restart_command`` is not set and the
    ``-d`` (daemonize) argument is missing from ``argv`` then the minion
    *will* be killed but will *not* be restarted and will require the parent
    process to perform the restart.  This behavior is intended for managed
    salt minion processes.
    CLI Example:
    .. code-block:: bash
        salt minion[12] minion.restart
        minion1:
            ----------
            comment:
                - Restart using process argv:
                -     /home/omniture/install/bin/salt-minion
                -     -d
                -     -c
                -     /home/omniture/install/etc/salt
            killed:
                10070
            restart:
                ----------
                stderr:
                stdout:
            retcode:
                0
        minion2:
            ----------
            comment:
                - Using configuration minion_restart_command:
                -     /home/omniture/install/bin/salt-minion
                -     --not-an-option
                -     -d
                -     -c
                -     /home/omniture/install/etc/salt
                - Restart failed
            killed:
                10896
            restart:
                ----------
                stderr:
                    Usage: salt-minion
                    salt-minion: error: no such option: --not-an-option
                stdout:
            retcode:
                64
    The result of the command shows the process ID of ``minion1`` that is
    shutdown (killed) and the results of the restart.  If there is a failure
    in the restart it will be reflected in a non-zero ``retcode`` and possibly
    output in the ``stderr`` and/or ``stdout`` values along with addition
    information in the ``comment`` field as is demonstrated with ``minion2``.
    """
    should_kill = True
    should_restart = True
    comment = []
    ret = {
        "killed": None,
        "restart": {},
        "retcode": 0,
    }
    restart_cmd = __salt__["config.get"]("minion_restart_command")
    if restart_cmd:
        comment.append("Using configuration minion_restart_command:")
        comment.extend(["    {}".format(arg) for arg in restart_cmd])
    else:
        if "-d" in sys.argv:
            restart_cmd = sys.argv
            comment.append("Restart using process argv:")
            comment.extend(["    {}".format(arg) for arg in restart_cmd])
        else:
            should_restart = False
            comment.append(
                "Not running in daemon mode - will not restart process after killing"
            )
    if should_kill:
        ret.update(kill())
        if "comment" in ret and ret["comment"]:
            if isinstance(ret["comment"], str):
                comment.append(ret["comment"])
            else:
                comment.extend(ret["comment"])
        if ret["retcode"]:
            comment.append("Kill failed - not restarting")
            should_restart = False
    if should_restart:
        ret["restart"] = __salt__["cmd.run_all"](restart_cmd, env=os.environ)
        # Do not want to mislead users to think that the returned PID from
        # cmd.run_all() is the PID of the new salt minion - just delete the
        # returned PID.
        if "pid" in ret["restart"]:
            del ret["restart"]["pid"]
        if ret["restart"].get("retcode", None):
            comment.append("Restart failed")
            ret["retcode"] = ret["restart"]["retcode"]
        if "retcode" in ret["restart"]:
            # Just want a single retcode
            del ret["restart"]["retcode"]
    if comment:
        ret["comment"] = comment
    return ret