def update_exploration(committer_id, exploration_id, change_list, commit_message, is_suggestion=False):
 is_public = rights_manager.is_exploration_public(exploration_id)
 if (is_public and (not commit_message)):
  raise ValueError('Exploration is public so expected a commit message but received none.')
 if (is_suggestion and ((not commit_message) or (not commit_message.startswith(feconf.COMMIT_MESSAGE_ACCEPTED_SUGGESTION_PREFIX)))):
  raise ValueError('Invalid commit message for suggestion.')
 if ((not is_suggestion) and commit_message and commit_message.startswith(feconf.COMMIT_MESSAGE_ACCEPTED_SUGGESTION_PREFIX)):
  raise ValueError(("Commit messages for non-suggestions may not start with '%s'" % feconf.COMMIT_MESSAGE_ACCEPTED_SUGGESTION_PREFIX))
 exploration = apply_change_list(exploration_id, change_list)
 _save_exploration(committer_id, exploration, commit_message, change_list)
 discard_draft(exploration_id, committer_id)
 update_exploration_summary(exploration.id, committer_id)
 user_services.add_edited_exploration_id(committer_id, exploration.id)
 user_services.record_user_edited_an_exploration(committer_id)
 if (not rights_manager.is_exploration_private(exploration.id)):
  user_services.update_first_contribution_msec_if_not_set(committer_id, utils.get_current_time_in_millisecs())

def update_exploration ( committer_id , exploration_id , change_list , commit_message , is_suggestion = False ) : is_public = rights_manager . is_exploration_public ( exploration_id ) if ( is_public and ( not commit_message ) ) : raise ValueError ( 'Exploration is public so expected a commit message but received none.' ) if ( is_suggestion and ( ( not commit_message ) or ( not commit_message . startswith ( feconf . COMMIT_MESSAGE_ACCEPTED_SUGGESTION_PREFIX ) ) ) ) : raise ValueError ( 'Invalid commit message for suggestion.' ) if ( ( not is_suggestion ) and commit_message and commit_message . startswith ( feconf . COMMIT_MESSAGE_ACCEPTED_SUGGESTION_PREFIX ) ) : raise ValueError ( ( "Commit messages for non-suggestions may not start with '%s'" % feconf . COMMIT_MESSAGE_ACCEPTED_SUGGESTION_PREFIX ) ) exploration = apply_change_list ( exploration_id , change_list ) _save_exploration ( committer_id , exploration , commit_message , change_list ) discard_draft ( exploration_id , committer_id ) update_exploration_summary ( exploration . id , committer_id ) user_services . add_edited_exploration_id ( committer_id , exploration . id ) user_services . record_user_edited_an_exploration ( committer_id ) if ( not rights_manager . is_exploration_private ( exploration . id ) ) : user_services . update_first_contribution_msec_if_not_set ( committer_id , utils . get_current_time_in_millisecs ( ) )
update an exploration .