def get_filing_forms_w_sections(self):
        """
        Returns a list of tuples, each containing a FilingForm object and list of
        FilingFormSection objects, if specific sections of the filing form are
        relevant to the model.
        """
        from calaccess_raw.annotations import FilingForm

        forms_dict = {}

        for i in self.FILING_FORMS:
            if isinstance(i, FilingForm):
                try:
                    forms_dict[i]
                except KeyError:
                    forms_dict[i] = []
            else:
                try:
                    forms_dict[i.form].append(i)
                except __HOLE__:
                    forms_dict[i.form] = [i]

        return sorted(forms_dict.items(), key=lambda x: x[0].id)
dataset/ETHPy150Open california-civic-data-coalition/django-calaccess-raw-data/calaccess_raw/models/base.py/CalAccessBaseModel.get_filing_forms_w_sections