'Add responses to the thread'

def add_response(self, response, comments, thread):

    response['children'] = comments
    if (thread['thread_type'] == 'discussion'):
        response_list_attr = 'children'
    elif response['endorsed']:
        response_list_attr = 'endorsed_responses'
    else:
        response_list_attr = 'non_endorsed_responses'
    thread.setdefault(response_list_attr, []).append(response)
    thread['comments_count'] += (len(comments) + 1)
