code: def __setattr__(self, key, value):
      if key == "_mode" and value not in ("raise", "wrap", "clip"):
          raise ValueError(
              f"mode should be raise, wrap or clip, not {value}"
          )
  
      super().__setattr__(key, value)
  
imports: import numpy
  from ...None import opcodes
  from ...serialization.serializables import FieldTypes, KeyField, ListField, StringField
  from ..utils import broadcast_shape, check_out_param
  from ..operands import TensorOperand, TensorOperandMixin
  from ..datasource import tensor
  from ..core import Tensor, TensorOrder
  from ..array_utils import as_same_device, device
label_desc: Use image node_id 2 for calling the TensorChoose obj's underlying member method code with example usage: obj.__setattr__(key, value) without return types