def subnamedtuple(typename, cls, new_fields=[], override_fields=[]):
    override_dict = dict((get_field_name(f), f) for f in override_fields)
    fields = []
    for f in cls._vistrails_fields:
        field_name = get_field_name(f)
        if field_name in override_dict:
            fields.append(override_dict[field_name])
        else:
            fields.append(f)
    fields.extend(new_fields)

    return namedtuple(typename, fields)
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/core/modules/config.py/subnamedtuple/original