def add_module(self, module, **kwargs):
        """Add a module to the registry.

        Options are taken from the `_settings` attribute, a
        :class:`~vistrails.core.modules.config.ModuleSettings` instance. All of
        the attributes of that class may also be used as kwargs to
        `add_module()`.

        :returns: The new
            :class:`~vistrails.core.modules.module_descriptor.ModuleDescriptor`
        """
        def remap_dict(d):
            remap = {'configureWidgetType': 'configure_widget',
                     'constantWidget': 'constant_widget',
                     'constantWidgets': 'constant_widgets',
                     'signatureCallable': 'signature',
                     'constantSignatureCallable': 'constant_signature',
                     'moduleColor': 'color',
                     'moduleFringe': 'fringe',
                     'moduleLeftFringe': 'left_fringe',
                     'moduleRightFringe': 'right_fringe',
                     'is_abstract': 'abstract'}
            remapped_d = {}
            for k, v in d.iteritems():
                if remap in k:
                    remapped_d[remap[k]] = v
                else:
                    remapped_d[k] = v
            return remapped_d

        module_settings = None
        if '_settings' in module.__dict__:
            settings = module.__dict__['_settings']
            if isinstance(settings, ModuleSettings):
                module_settings = settings
            elif isinstance(settings, dict):
                module_settings = ModuleSettings(**remap_dict(settings))
            else:
                raise TypeError("Expected module._settings to be "
                                "ModuleSettings or dict")

        remapped_kwargs = remap_dict(kwargs)
        if module_settings is not None:
            module_settings = module_settings._replace(**remapped_kwargs)
        else:
            module_settings = ModuleSettings(**remapped_kwargs)
        return self.add_module_from_settings(module, module_settings)
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/core/modules/module_registry.py/ModuleRegistry.add_module/swapped operands of `in`