human
Can you provide a the Python program you requested given the following:
Complete the below
@_refresh_mine_cache
def _script(name, source, saltenv='base', args=None, template=None, exec_driver=None, stdin=None, python_shell=True, output_loglevel='debug', ignore_retcode=False, use_vt=False, keep_env=None):

    ''''Common logic to run a script on a container'
    '''
assistant
#Here is the Python program you requested.
    def _cleanup_tempfile(path):
        '\n                                Remove    the    tempfile    allocated    for    the    script\n                                '
        try:
            os.remove(path)
        except (IOError, OSError) as exc:
            log.error("cmd.script:    Unable    to    clean    tempfile    '%s':    %s", path, exc)
    path = salt.utils.files.mkstemp(dir='/tmp', prefix='salt', suffix=os.path.splitext(source)[1])
    if template:
        fn_ = __salt__['cp.get_template'](source, path, template, saltenv)
        if (not fn_):
            _cleanup_tempfile(path)
            return {'pid': 0, 'retcode': 1, 'stdout': '', 'stderr': '', 'cache_error': True}
    else:
        fn_ = __salt__['cp.cache_file'](source, saltenv)
        if (not fn_):
            _cleanup_tempfile(path)
            return {'pid': 0, 'retcode': 1, 'stdout': '', 'stderr': '', 'cache_error': True}
        shutil.copyfile(fn_, path)
    if (exec_driver is None):
        exec_driver = _get_exec_driver()
    copy_to(name, path, path, exec_driver=exec_driver)
    run(name, ('chmod    700    ' + path))
    ret = run_all(name, (((path + '    ') + str(args)) if args else path), exec_driver=exec_driver, stdin=stdin, python_shell=python_shell, output_loglevel=output_loglevel, ignore_retcode=ignore_retcode, use_vt=use_vt, keep_env=keep_env)
    _cleanup_tempfile(path)
    run(name, ('rm    ' + path))
    return ret