def alias_present(name, FunctionName, Name, FunctionVersion, Description='',
            region=None, key=None, keyid=None, profile=None):
    ret = {'name': Name,
           'result': True,
           'comment': '',
           'changes': {}
           }

    r = __salt__['boto_lambda.alias_exists'](FunctionName=FunctionName, Name=Name, region=region,
                                    key=key, keyid=keyid, profile=profile)

    if 'error' in r:
        ret['result'] = False
        ret['comment'] = 'Failed to create alias: {0}.'.format(r['error']['message'])
        return ret

    if not r.get('exists'):
        if __opts__['test']:
            ret['comment'] = 'Alias {0} is set to be created.'.format(Name)
            ret['result'] = None
            return ret
        r = __salt__['boto_lambda.create_alias'](FunctionName, Name,
                FunctionVersion, Description,
                region, key, keyid, profile)
        if not r.get('created'):
            ret['result'] = False
            ret['comment'] = 'Failed to create alias: {0}.'.format(r['error']['message'])
            return ret
        _describe = __salt__['boto_lambda.describe_alias'](FunctionName, Name, region=region, key=key,
                                                  keyid=keyid, profile=profile)
        ret['changes']['old'] = {'alias': None}
        ret['changes']['new'] = _describe
        ret['comment'] = 'Alias {0} created.'.format(Name)
        return ret

    ret['comment'] = os.linesep.join([ret['comment'], 'Alias {0} is present.'.format(Name)])
    ret['changes'] = {}
    _describe = __salt__['boto_lambda.describe_alias'](FunctionName, Name,
                                                  region=region, key=key, keyid=keyid,
                                                  profile=profile)['alias']

    need_update = False
    for val, var in {
        'FunctionVersion': 'FunctionVersion',
        'Description': 'Description',
    }.iteritems():
        if _describe[val] != locals()[var]:
            need_update = True
            ret['changes'].setdefault('new', {})[var] = locals()[var]
            ret['changes'].setdefault('old', {})[var] = _describe[val]
    if need_update:
        ret['comment'] = os.linesep.join([ret['comment'], 'Alias config to be modified'])
        if __opts__['test']:
            msg = 'Alias {0} set to be modified.'.format(Name)
            ret['comment'] = msg
            ret['result'] = None
            return ret
        _r = __salt__['boto_lambda.update_alias'](FunctionName=FunctionName, Name=Name,
                                        FunctionVersion=FunctionVersion, Description=Description,
                                        region=region, key=key,
                                        keyid=keyid, profile=profile)
        if not _r.get('updated'):
            ret['result'] = False
            ret['comment'] = 'Failed to update alias: {0}.'.format(_r['error']['message'])
            ret['changes'] = {}
    return ret
@summary: Since a given pkl file can exist in any of the folders- we need to look for it in each one until we find it. Thats what this function does.
dataset/ETHPy150Open saltstack/salt/salt/states/boto_lambda.py/alias_present--crossover with--dataset/ETHPy150Open QuantSoftware/QuantSoftwareToolkit/QSTK/qstkutil/DataAccess.py/DataAccess.getPathOfFile