def compute(self, **kwargs):
        """
        Determine if all the blocks in the plan are assigned to a district.

        @keyword plan: A L{Plan} whose blocks are evaluated for assignment.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
        @keyword threshold: Optional. The amount of simplification used 
            during buffering optimization.
        """
        if not 'plan' in kwargs:
            return

        plan = kwargs['plan']
        version = kwargs['version'] if kwargs in 'version' else plan.version

        threshold = self.get_value('threshold')
        if not threshold:
            threshold = 100

        geounits = plan.get_unassigned_geounits(threshold=threshold, version=version)
        self.result = { 'value': len(geounits) == 0 }
dataset/ETHPy150Open PublicMapping/DistrictBuilder/django/publicmapping/redistricting/calculators.py/AllBlocksAssigned.compute/swapped operands of `in`