def present(name,
            **kwargs):

    ret = {'name': name,
           'result': True,
           'changes': {},
           'comment': []}

    current_schedule = __salt__['schedule.list'](show_all=True, return_yaml=False)

    if name in current_schedule:
        new_item = __salt__['schedule.build_schedule_item'](name, **kwargs)

        # See if the new_item is valid
        if isinstance(new_item, dict):
            if 'result' in new_item and not new_item['result']:
                ret['result'] = new_item['result']
                ret['comment'] = new_item['comment']
                return ret

            # The schedule.list gives us an item that is guaranteed to have an
            # 'enabled' argument. Before comparing, add 'enabled' if it's not
            # available (assume True, like schedule.list does)
            if 'enabled' not in new_item:
                new_item['enabled'] = True

        if new_item == current_schedule[name]:
            ret['comment'].append('Job {0} in correct state'.format(name))
        else:
            if 'test' in __opts__ and __opts__['test']:
                kwargs['test'] = True
                result = __salt__['schedule.modify'](name, **kwargs)
                ret['comment'].append(result['comment'])
                ret['changes'] = result['changes']
            else:
                result = __salt__['schedule.modify'](name, **kwargs)
                if not result['result']:
                    ret['result'] = result['result']
                    ret['comment'] = result['comment']
                    return ret
                else:
                    ret['comment'].append('Modifying job {0} in schedule'.format(name))
                    ret['changes'] = result['changes']
    else:
        if 'test' in __opts__ and __opts__['test']:
            kwargs['test'] = True
            result = __salt__['schedule.add'](name, **kwargs)
            ret['comment'].append(result['comment'])
        else:
            result = __salt__['schedule.add'](name, **kwargs)
            if not result['result']:
                ret['result'] = result['result']
                ret['comment'] = result['comment']
                return ret
            else:
                ret['comment'].append('Adding new job {0} to schedule'.format(name))

    ret['comment'] = '\n'.join(ret['comment'])
    return ret
Add a format element to the specified sequence.
dataset/ETHPy150Open saltstack/salt/salt/states/schedule.py/present--crossover with--dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.5/extras/completion/py/maya/app/edl/fcp.py/FCP.writeFormat