def METHOD_NAME(commands, shell=False, cwd=None, env=None, return_code=False):
    """wrapper of subprocess.Popen for enabling testing
    Inputs
    --------
    commands (list) = commands to run in subprocess call
    shell (bool) = if commands should be executed in shell
    cwd = sets the current directory before subprocess call executes
    encoding (str) = which encoding to use
    env = defines the environment variables for the subprocess call
    return_code (bool) = if the return code should be returned or not
    Return
    --------
    (stdout,stderr) decoded to utf-8
    if return_code = True returns: (stdout,stderr,returncode)
    """
    with subprocess.Popen(
        commands,
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
        cwd=cwd,
        env=env,
        shell=shell,
    ) as process:
        stdout, stderr = process.communicate()
        if return_code:
            ret_code = process.returncode
    if return_code:
        return (stdout.decode("utf-8"), stderr.decode("utf-8"), ret_code)
    return (stdout.decode("utf-8"), stderr.decode("utf-8"))