<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def analyze_quality(self):
 """Go through HPAGroups and store the distro of ordinal values of quality scores"""

    res = {}
    for h in self._hpas:
      if h.type() not in res: res[h.type()]={}
      for c in h.get_quality():
        if c not in res[h.type()]: res[h.type()][c] = 0
        res[h.type()][c]+=1
    self._quality_distro = res