code: def serialize(self, x):
          
          weeks = x.days // 7
          days = x.days % 7
          hours = x.seconds // 3600
          minutes = (x.seconds % 3600) // 60
          seconds = (x.seconds % 3600) % 60
          result = "{} w {} d {} h {} m {} s".format(weeks, days, hours, minutes, seconds)
          return result
docs: Converts datetime.timedelta to a string
  
          :param x: the value to serialize.