def _get_users(discussion_entity_type, discussion_entity, username_profile_dict):
 users = {}
 if discussion_entity['author']:
  users[discussion_entity['author']] = _user_profile(username_profile_dict[discussion_entity['author']])
 if ((discussion_entity_type == DiscussionEntity.comment) and discussion_entity['endorsed'] and discussion_entity['endorsed_by']):
  users[discussion_entity['endorsed_by']] = _user_profile(username_profile_dict[discussion_entity['endorsed_by']])
 return users

def _get_users ( discussion_entity_type , discussion_entity , username_profile_dict ) : users = { } if discussion_entity [ 'author' ] : users [ discussion_entity [ 'author' ] ] = _user_profile ( username_profile_dict [ discussion_entity [ 'author' ] ] ) if ( ( discussion_entity_type == DiscussionEntity . comment ) and discussion_entity [ 'endorsed' ] and discussion_entity [ 'endorsed_by' ] ) : users [ discussion_entity [ 'endorsed_by' ] ] = _user_profile ( username_profile_dict [ discussion_entity [ 'endorsed_by' ] ] ) return users
get all users from slack .