def compute(self, **kwargs):
        """
        Get the related comments and tags, and store them in a dict for
        the result. The result is suitable for passing to the template
        that renders the comment sidebar.

        @keyword district: The district whose comments should be retrieved.
        """
        if not 'district' in kwargs:
            return
        
        district = kwargs['district']

        typetags = filter(lambda tag:tag.name[:4]=='type', district.tags)
        typetags = map(lambda tag:tag.name[5:], typetags)

        self.result = { 'typetags': typetags }
dataset/ETHPy150Open PublicMapping/DistrictBuilder/django/publicmapping/redistricting/calculators.py/Comments.compute/original