def patch_item_attr(self, name: str, key: str, value: str):
        """ patch item args

        Args:
            name (str): name of this item
            key (str): key you want to update
            value (str): value you wnat to set

        Returns:
            Raise if some check violates
        """
        if key not in self.__class__.MUTABLE_ITEM_KEY:
            raise ValueError(f'fail to change attribute {key}')

        with get_session(self.db_engine) as session:
            item: SchedulerItem = session.query(SchedulerItem).filter(
                SchedulerItem.name == name).first()
            if not item:
                raise ValueError(f'cannot find item {name}')
            setattr(item, key, value)
            session.add(item)
            try:
                session.commit()
            except Exception as e:  # pylint: disable=broad-except
                logging.error(f'[composer] failed to patch item attr, '
                              f'name: {name}, exception: {e}')
                session.rollback()
 patch item args

        Args:
            name (str): name of this item
            key (str): key you want to update
            value (str): value you wnat to set

        Returns:
            Raise if some check violates
        
web_console_v2/api/fedlearner_webconsole/composer/composer.py