def is_good_age_ratios(self):
        """Method to check the sum of age ratio is 1.

        :returns: True if the sum is 1 or the sum less than 1 but there is
            None.
        :rtype: bool
        """
        ratios = self.age_ratios()

        if None in ratios:
            # If there is None, just check to not exceeding 1
            clean_ratios = [x for x in ratios if x is not None]
            ratios.remove(None)
            if sum(clean_ratios) > 1:
                return False
        else:
            if sum(ratios) != 1:
                return False

        return True
def is_good_age_ratios ( self ) : ratios = self . age_ratios ( ) if None in ratios : clean_ratios = [ x for x in ratios if x is not None ] ratios . remove ( None ) if sum ( clean_ratios ) > 1 : return False else : if sum ( ratios ) != 1 : return False return True
Method to check the sum of age ratio is 1.

        :returns: True if the sum is 1 or the sum less than 1 but there is
            None.
        :rtype: bool