def METHOD_NAME(command, *args, **kwargs):
    ignore_errors = kwargs.pop("ignore_errors", False)
    try:
        sp = exec_cmd(command, *args, **kwargs)
    except Exception as exc:
        if not ignore_errors:
            raise
        returncode = 1
        stdoutdata = ""
        stderrdata = to_str(exc).strip()
    else:
        returncode = sp.returncode
        stdoutdata, stderrdata = map(str.strip, sp.communicate())
    return returncode, stdoutdata, stderrdata