code: def discussion_is_still_open(self, discussion_type, auto_close_after):
          
          discussion_enabled = getattr(self, discussion_type)
          if (discussion_enabled and isinstance(auto_close_after, int) and
                  auto_close_after >= 0):
              return (timezone.now() - (
                  self.start_publication or self.publication_date)).days < \
                  auto_close_after
          return discussion_enabled
docs: Checks if a type of discussion is still open
          are a certain number of days.