code: def calculate_usage(self, cpu, total, busy):
          
          diff_total = total - self.prev_total[cpu]
          diff_busy = busy - self.prev_busy[cpu]
  
          self.prev_total[cpu] = total
          self.prev_busy[cpu] = busy
  
          if diff_total == 0:
              return 0
          else:
              return int(diff_busy / diff_total * 100)
docs: calculates usage