class_docstr: Quaternion trait.
class_docstr_tok: ["Quaternion","trait","."]
code: def validate(self, obj, value):
      if isinstance(value, pyquat.Quaternion):
          value = tuple(value)
  
      value = np.array(value, dtype=np.float32)
      if value.shape != (4,):
          self.error(obj, value)
      else:
          value.setflags(write=False)
          return value
  
imports: import numpy
  import traitlets
  import pyquaternion
  from kubric.core import color
  from kubric.core.assets import UndefinedAsset
  from kubric.core.assets import Asset
label_desc: Use image node_id 1 for calling the Quaternion obj's underlying member method code with example usage: obj.validate(obj, value) and returns: value