def _parse_task_options(self, options, task_class, task_config):
    if ('options' not in task_config.config):
        task_config.config['options'] = {}
    if options:
        for (name, value) in options.items():
            if (name not in task_class.task_options):
                raise TaskOptionsError('Option "{}" is not available for task {}'.format(name, task_class))
            task_config.config['options'][name] = value
    return task_config
def _parse_task_options(self, options, task_class, task_config):
    if ('options' not in task_config.config):
        task_config.config['options'] = {}
    if options:
        for (name, value) in options.items():
            if (name not in task_class.task_options):
                raise TaskOptionsError('Option "{}" is not available for task {}'.format(name, task_class))
            task_config.config['options'][name] = value
    return task_config