code: def __init__(self, q=np.array((1.0, 0.0, 0.0, 0.0))):
      if isinstance(q, Quaternion):
          self.q = q.q.copy()
      else:
          q = np.asarray(q)
          if q.size == 4:
              self.q = q.copy()
          elif q.size == 3:  # convert from a 3-vector to a quaternion
              self.q = np.empty(4)
              self.q[0], self.q[1:] = 0.0, q.ravel()
          else:
              raise Exception(
                  "Input quaternion should be a 3- or 4-vector"
              )
  
imports: import numpy
label_desc: Use image node_id 3 to create a new Quaternion object  with example: obj = Quaternion(q)