<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def __render_script(path, vm_=None, opts=None, minion=''):
    '''
    Return the rendered script
    '''
    log.info('Rendering deploy script: %s', path)
    try:
        with salt.utils.files.fopen(path, 'r') as fp_:
            template = Template(salt.utils.stringutils.to_unicode(fp_.read()))
            return six.text_type(template.render(opts=opts, vm=vm_, minion=minion))
    except AttributeError:
        # Specified renderer was not found
        with salt.utils.files.fopen(path, 'r') as fp_:
            return six.text_type(fp_.read())