def METHOD_NAME(self, request, ctx, note_res, note, owner, viewer):
    if not note.is_global_annotation:
        ctx[note.asset.id]['annotation_count'] += 1
        if note.author == viewer:
            ctx[note.asset.id]['my_annotation_count'] += 1
    if note.modified > note.asset.modified:
        ctx[note.asset.id]['modified'] = self.format_time(note.modified)
    if self.include_annotations:
        note_ctx = note_res.render_one(request, note, "")
        if note.is_global_annotation:
            if note.author == owner:
                ctx[note.asset.id]['global_annotation'] = note_ctx
        else:
            ctx[note.asset.id]['annotations'].append(note_ctx)