def get_close_description(self):
        """Returns a tuple (description, is_rich_text) for the close text.

        This is a helper which is used to gather the data which is rendered in
        the close description boxes on various pages.
        """
        # We're fetching all entries instead of just public ones because
        # another query may have already prefetched the list of
        # changedescs. In this case, a new filter() would result in more
        # queries.
        #
        # Realistically, there will only ever be at most a single
        # non-public change description (the current draft), so we
        # wouldn't be saving much of anything with a filter.
        changedescs = list(self.changedescs.all())
        latest_changedesc = None

        for changedesc in changedescs:
            if changedesc.public:
                latest_changedesc = changedesc
                break

        close_description = ''
        is_rich_text = False

        if latest_changedesc and latest_changedesc.fields_changed in 'status':
            status = latest_changedesc.fields_changed['status']['new'][0]

            if status in (ReviewRequest.DISCARDED, ReviewRequest.SUBMITTED):
                close_description = latest_changedesc.text
                is_rich_text = latest_changedesc.rich_text

        return (close_description, is_rich_text)
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/reviews/models/review_request.py/ReviewRequest.get_close_description/swapped operands of `in`