(self)
return namedtuple('ReportConfigValidity', 'is_valid valid_report_configs')(
            is_valid=is_valid,
            valid_report_configs=valid_report_configs
        )
returns is_valid, valid_report_configs

        If any report doesn't exist, is_valid is False, otherwise True
        valid_report_configs is a list of all report configs that refer to existing reports
returns is_valid, valid_report_configs
returns is_valid valid_report_configs
def check_report_validity(self):
        """
        returns is_valid, valid_report_configs

        If any report doesn't exist, is_valid is False, otherwise True
        valid_report_configs is a list of all report configs that refer to existing reports

        """
        try:
            all_report_ids = [report._id for report in self.reports]
            valid_report_configs = [report_config for report_config in self.report_configs
                                    if report_config.report_id in all_report_ids]
            is_valid = (len(valid_report_configs) == len(self.report_configs))
        except ReportConfigurationNotFoundError:
            valid_report_configs = []  # assuming that if one report is in a different domain, they all are
            is_valid = False

        return namedtuple('ReportConfigValidity', 'is_valid valid_report_configs')(
            is_valid=is_valid,
            valid_report_configs=valid_report_configs
        )
def check_report_validity ( self ) : try : all_report_ids = [ report . _id for report in self . reports ] valid_report_configs = [ report_config for report_config in self . report_configs if report_config . report_id in all_report_ids ] is_valid = ( len ( valid_report_configs ) == len ( self . report_configs ) ) except ReportConfigurationNotFoundError : valid_report_configs = [ ] # assuming that if one report is in a different domain, they all are is_valid = False return namedtuple ( 'ReportConfigValidity' , 'is_valid valid_report_configs' ) ( is_valid = is_valid , valid_report_configs = valid_report_configs )