def compute(self, **kwargs):
        """
        Compute the contiguity of all the districts in the plan.

        @keyword plan: A L{Plan} whose set of districts should be 
            evaluated for contiguity.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
        """
        if not 'plan' in kwargs:
            return

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

        calc = Contiguity()
        calc.compute(**kwargs)

        self.result = { 'value': (len(districts) - 1) == calc.result['value'] }
dataset/ETHPy150Open PublicMapping/DistrictBuilder/django/publicmapping/redistricting/calculators.py/AllContiguous.compute/original