code: def set_sort_by(self, sort_by):
          
          if not isinstance(sort_by, SortType):
              raise DaftException("sort_by should be an instance of SortType.")
  
          self._sort_by = str(sort_by)
docs: Use this method to sort by price, distance, upcoming viewing or date using the SortType object.
          :param sort_by:
          :return: