def import_contiguity_overrides(self):
        """
        Create the ContiguityOverride models. This is optional.

        @returns: A flag indicating if the import was successful.
        """
        # Remove previous contiguity overrides
        ContiguityOverride.objects.all().delete()
            
        if not self.store.has_contiguity_overrides():
            logger.debug('ContiguityOverrides not configured')

        # Import contiguity overrides.
        for co in self.store.filter_contiguity_overrides():
            portable_id = co.get('id')
            temp = Geounit.objects.filter(portable_id=portable_id)
            if (len(temp) == 0):
                raise Exception('There exists no geounit with portable_id: %s' % portable_id)
            override_geounit = temp[0]

            portable_id = co.get('connect_to')
            temp = Geounit.objects.filter(portable_id=portable_id)
            if (len(temp) == 0):
                raise Exception('There exists no geounit with portable_id: %s' % portable_id)
            connect_to_geounit = temp[0]

            co_obj, created = ContiguityOverride.objects.get_or_create(
                override_geounit=override_geounit, 
                connect_to_geounit=connect_to_geounit 
                )

            if created:
                logger.debug('Created ContiguityOverride "%s"', str(co_obj))
            else:
                logger.debug('ContiguityOverride "%s" already exists', str(co_obj))

        return True
dataset/ETHPy150Open PublicMapping/DistrictBuilder/django/publicmapping/redistricting/config.py/ConfigImporter.import_contiguity_overrides/original