def _dryrun(submit, returnStdout, returnStderr, returnExitcode, *args):
    """Used by the :func:`run` function when the :attr:`DRY_RUN` flag is
    active.
    """
    if submit:
        return '0',
    results = []
    stderr = ''
    stdout = ' '.join(args)
    if returnStdout:
        results.append(stdout)
    if returnStderr:
        results.append(stderr)
    if returnExitcode:
        results.append(0)
    if len(results) == 1:
        return results[0]
    else:
        return tuple(results)
