'Create a serializer with an appropriate context and use it to serialize
the given thread, returning the result.'

def serialize(self, thread):

    return ThreadSerializer(thread, context=get_context(self.course, self.request)).data
