def compute(self, **kwargs):
        """
        Calculate splits between a district and a target geolevel.

        @keyword district: A L{District} whose splits should be computed.
        @keyword boundary_id: The ID of the geolevel to compare for splits.
        """
        if not 'district' in kwargs:
            return

        district = kwargs['district']
        if district.geom.empty:
            return

        geolevel_id = self.get_value('geolevel_id')
        num_splits = district.count_splits(geolevel_id)
        
        self.result = { 'value': num_splits }
dataset/ETHPy150Open PublicMapping/DistrictBuilder/django/publicmapping/redistricting/calculators.py/DistrictSplitCounter.compute/original