def METHOD_NAME(cmd, **kwargs):
    """
    run the command cmd, read the results and return them
    this is sorta like `cmd` in shell
    :param cmd: command to run with Popen
    :type cmd: string, list
    :returns: command stdout
    :rtype: string
    """
    from subprocess import Popen, PIPE, STDOUT
    if isinstance(cmd, str):
        cmd = cmd.split()
    no_exception = "exception" in kwargs
    exception = kwargs.pop("exception", None)
    kwargs.setdefault("shell", False)
    kwargs.setdefault("stdout", PIPE)
    kwargs.setdefault("stderr", STDOUT)
    kwargs.setdefault("close_fds", True)
    try:
        subp = Popen(cmd, **kwargs)
    except Exception as e:
        if no_exception:
            return -1, exception
        raise
    output = subp.communicate()[0].decode("utf-8")
    return output