def substitute_config_values(configs, template, path):
    if u.is_node_group(template):
        opt_names = node_group_template_opt_names
    else:
        opt_names = cluster_template_opt_names

    for opt, value in six.iteritems(configs):
        if opt_names in opt and opt in template:
            template[opt] = value
dataset/ETHPy150Open openstack/sahara/sahara/db/templates/api.py/substitute_config_values/swapped operands of `in`