<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compute_treshold_interval(self):
 """ Current method is to compute average from all intervals. """


        intervals = [m.interval for m in self.modules if hasattr(m, "interval")]
        if len(intervals) > 0:
            self.treshold_interval = round(sum(intervals) / len(intervals))