def storage_color(self, user_storage):
        """
        Return labels indicating amount of storage used.
        """
        p = user_storage.percentage
        if p >= 0 and p < 60:
            return "success"
        if p >= 60 and p < 90:
            return "warning"
        if p >= 90 and p <= 100:
            return "danger"
        raise ValueError("percentage out of range")
def storage_color ( self , user_storage ) : p = user_storage . percentage if p >= 0 and p < 60 : return "success" if p >= 60 and p < 90 : return "warning" if p >= 90 and p <= 100 : return "danger" raise ValueError ( "percentage out of range" )
Return labels indicating amount of storage used.