You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: mentored_team.rb
    path of file: ./repos/expertiza/app/models
    
    the code of the file until where you have to start completion: class MentoredTeam < AssignmentTeam
    # Class created during refactoring of E2351
    # Overridden method to include the MentorManagement workf
    
    def add_member(user, _assignment_id = nil)
        raise "The user #{user.name} is already a member of the team #{name}" if user?(user)
    
        can_add_member = false
        unless full?
          can_add_member = true
          t_user = TeamsUser.create(user_id: user.id, team_id: id)
          parent = TeamNode.find_by(node_object_id: id)
          TeamUserNode.create(parent_id: parent.id, node_object_id: t_user.id)
          add_participant(parent_id, user)
          ExpertizaLogger.info LoggerMessage.new('Model:Team', user.name, "Added member to the team #{id}")
        end