def compute(self, **kwargs):
        """
        Determine if all the districts in a plan fall within a target
        range.

        @keyword plan: A L{Plan} whose set of districts should be 
            evaluated for equipopulation.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
        @keyword target: Optional. The target number of districts to report
            in the HTML output.
        @keyword validation: Optional. Change the output of the calculator 
            to a boolean measure for plan validity.
        """
        if not 'plan' in kwargs:
            return

        plan = kwargs['plan']

        inrange = Range()
        inrange.arg_dict = self.arg_dict
        inrange.compute(**kwargs)

        version = kwargs['version'] if 'version' in kwargs else plan.version
        districts = plan.get_districts_at_version(version, include_geom=False)

        try:
            target = self.get_value('target')
            validation = self.get_value('validation')
            if validation != None:
                # ALL PLANS include 1 district named "Unassigned", which
                # should never be at the target.
        
                self.result = { 'value': inrange.result['value'] == (1 - len(districts)) }
            elif target != None:
                self.result = { 'value':_('%(value)d (of %(target)s)') % {'value': inrange.result['value'], 'target': target} }
            else:
                self.result = inrange.result
        except:
            self.result = inrange.result
dataset/ETHPy150Open PublicMapping/DistrictBuilder/django/publicmapping/redistricting/calculators.py/Equipopulation.compute/swapped operands of `-`