def _create_user(user_id, email):
 user_settings = get_user_settings(user_id, strict=False)
 if (user_settings is not None):
  raise Exception(('User %s already exists.' % user_id))
 user_settings = UserSettings(user_id, email, preferred_language_codes=[feconf.DEFAULT_LANGUAGE_CODE])
 _save_user_settings(user_settings)
 create_user_contributions(user_id, [], [])
 return user_settings

def _create_user ( user_id , email ) : user_settings = get_user_settings ( user_id , strict = False ) if ( user_settings is not None ) : raise Exception ( ( 'User %s already exists.' % user_id ) ) user_settings = UserSettings ( user_id , email , preferred_language_codes = [ feconf . DEFAULT_LANGUAGE_CODE ] ) _save_user_settings ( user_settings ) create_user_contributions ( user_id , [ ] , [ ] ) return user_settings
creates a new user .