def METHOD_NAME(no_output, *popenargs, **kwargs):
    r"""Backport from subprocess module from python 2.7"""
    if 'stdout' in kwargs:
        raise ValueError(
            'stdout argument not allowed, it will be overridden.')
    if no_output:
        out_file = None
    else:
        out_file = subprocess.PIPE
    process = subprocess.Popen(stdout=out_file, *popenargs, **kwargs)
    output, unused_err = process.communicate()
    retcode = process.poll()
    if retcode:
        cmd = kwargs.get("args")
        if cmd is None:
            cmd = popenargs[0]
        raise CalledProcessError(retcode, cmd, output=output)
    return output