def METHOD_NAME(self, value):
    if not isinstance(value, dict):
        raise ValueError('unsupported type')
    for name, v in value.items():
        if not isinstance(v, (int, bool, float, str)):
            raise ValueError('unsupported type')
        if name in ('id', 'class'):
            raise RuntimeError(
                f"Node.attributes['{name}'] is not supported. Use Node.{name}_list instead.",
            )
        if name == 'style':
            raise RuntimeError(
                f"Node.attributes['{name}'] is not supported. Use Node.{name} instead.",
            )
    with self._node.lock:
        self._attributes = value
        self._node.document.add_patch(
            node_id=self._node.id,
            patch_type=self.PATCH_TYPE,
            operation=OPERATION.RESET,
            payload=[
                dict(value),
            ],
        )