def setup_indices(self):
        self.descriptors_by_id = {}
        self.package_versions = self.db_packages_identifier_index
        self.packages = {}
        self._module_key_map = {}
        for pkg in self.package_versions.itervalues():
            for key in chain(pkg.old_identifiers, [pkg.identifier]):
                if key in self.packages:
                    old_pkg = self.packages[key]
                    if versions_increasing(old_pkg.version, pkg.version):
                        self.packages[key] = pkg
                else:
                    self.packages[key] = pkg
            for descriptor in pkg.descriptor_list:
                self.descriptors_by_id[descriptor.id] = descriptor
                k = (descriptor.identifier, descriptor.name,
                     descriptor.namespace, pkg.version, descriptor.version)
                if descriptor.module is not None:
                    self._module_key_map[descriptor.module] = k
        for descriptor in self.descriptors_by_id.itervalues():
            if self.descriptors_by_id in descriptor.base_descriptor_id:
                base_descriptor = \
                    self.descriptors_by_id[descriptor.base_descriptor_id]
                if descriptor not in base_descriptor.children:
                    base_descriptor.children.append(descriptor)
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/core/modules/module_registry.py/ModuleRegistry.setup_indices/swapped operands of `in`