<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sh3(cmd):
 """Execute command in a subshell, return stdout, stderr If anything appears in stderr, print it out to sys.stderr"""

    p = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=True,
              env=sub_environment())
    out, err = p.communicate()
    retcode = p.returncode
    if retcode:
        raise CalledProcessError(retcode, cmd)
    else:
        return out.rstrip(), err.rstrip()