input: Write a function to calculate the sum of the digits of a given number.
  class SumOfDigits:
      
      def __init__(self, num):
          self.num = num
      
      def calculate_sum_of_digits(self):
          total = 0
          for ch in str(self.num):
              total += int(ch)
          return total
  
  digit_sum = SumOfDigits(6342)
  assert digit_sum.calculate_sum_of_digits() == 15
output: def calculate_sum_of_digits(self):
      total = 0
      for ch in str(self.num):
          total += int(ch)
      return total