def process_fields(self, layout, fields, category, parent_fields=[], 
                       prev_field=None, prefix=""):
        for field in fields:
            if isinstance(field, ConfigFieldParent):
                self.process_fields(layout, field.sub_fields, category,
                                    parent_fields, prev_field,
                                    prefix="%s%s." % (prefix, field.name))
            else:
                if field.depends_on is not None:
                    if field.depends_on not in parent_fields:
                        if field.depends_on == prev_field:
                            parent_fields.append(prev_field)
                        else:
                            raise Exception("Dependent field %s should "
                                            "follow parent." % field.name)
                    parent_idx = parent_fields.index(field.depends_on)
                    parent_fields = parent_fields[:parent_idx+1]
                    indent = 4 * len(parent_fields)
                else:
                    parent_fields = []
                    indent = 0
                self.add_field(layout, field, category, prefix=prefix, 
                               indent=indent)
                prev_field = field.name
                category = ""
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/gui/configuration.py/QConfigurationPane.process_fields/original