code: def notes(self, public_only=False):
          tag_index = dict((tag, i) for i, tag in enumerate(Note.TAGS))
          notes = self.note_set.order_by('-sort_num', 'created')
          if public_only:
              notes = notes.filter(is_public=True)
          known_issues = [n for n in notes if n.is_known_issue_for(self)]
          new_features = sorted(
              sorted(
                  (n for n in notes if not n.is_known_issue_for(self)),
                  key=lambda note: tag_index.get(note.tag, 0)),
              key=lambda n: n.tag == 'Fixed' and n.note.startswith(self.version),
              reverse=True)
          return new_features, known_issues