code: def get_course_duration(self, obj):
          
          duration = obj.end - obj.start if obj.start and obj.end else None
          if duration:
              return strfdelta(duration, '{W} weeks {D} days.')
          return ''
docs: Get course's duration as a timedelta.
  
          Arguments:
              obj (CourseOverview): CourseOverview object
  
          Returns:
              (timedelta): Duration of a course.