def get_editable_fields(cc_content, context):
 ret = {'abuse_flagged'}
 if ((cc_content['type'] == 'thread') and cc_content['closed']):
  ret |= {'read'}
  return ret
 if ((cc_content['type'] == 'comment') and context['thread']['closed']):
  return ret
 ret |= {'voted'}
 if _is_author_or_privileged(cc_content, context):
  ret |= {'raw_body'}
 if (cc_content['type'] == 'thread'):
  ret |= {'following', 'read'}
  if _is_author_or_privileged(cc_content, context):
   ret |= {'topic_id', 'type', 'title'}
  if (context['is_requester_privileged'] and context['course'].is_cohorted):
   ret |= {'group_id'}
 if ((cc_content['type'] == 'comment') and (context['is_requester_privileged'] or (_is_author(context['thread'], context) and (context['thread']['thread_type'] == 'question')))):
  ret |= {'endorsed'}
 return ret

def get_editable_fields ( cc_content , context ) : ret = { 'abuse_flagged' } if ( ( cc_content [ 'type' ] == 'thread' ) and cc_content [ 'closed' ] ) : ret |= { 'read' } return ret if ( ( cc_content [ 'type' ] == 'comment' ) and context [ 'thread' ] [ 'closed' ] ) : return ret ret |= { 'voted' } if _is_author_or_privileged ( cc_content , context ) : ret |= { 'raw_body' } if ( cc_content [ 'type' ] == 'thread' ) : ret |= { 'following' , 'read' } if _is_author_or_privileged ( cc_content , context ) : ret |= { 'topic_id' , 'type' , 'title' } if ( context [ 'is_requester_privileged' ] and context [ 'course' ] . is_cohorted ) : ret |= { 'group_id' } if ( ( cc_content [ 'type' ] == 'comment' ) and ( context [ 'is_requester_privileged' ] or ( _is_author ( context [ 'thread' ] , context ) and ( context [ 'thread' ] [ 'thread_type' ] == 'question' ) ) ) ) : ret |= { 'endorsed' } return ret
return the set of fields that the requester can edit on the given content .