parameters: (user_id: int, is_expert: bool)
return_statement: return user
docstring: Enabled or disables expert mode for the user
          :raises: UserServiceError
docstring_summary: Enabled or disables expert mode for the user
          :raises: UserServiceError
docstring_tokens: Enabled or disables expert mode for the user : raises : UserServiceError
function: def set_user_is_expert(user_id: int, is_expert: bool) -> User:
          """
          Enabled or disables expert mode for the user
          :raises: UserServiceError
          """
          user = UserService.get_user_by_id(user_id)
          user.set_is_expert(is_expert)
  
          return user
function_tokens: def set_user_is_expert ( user_id : int , is_expert : bool ) -> User : user = UserService . get_user_by_id ( user_id ) user . set_is_expert ( is_expert ) return user