code: def quaternion(self, quat):
      assert isinstance(quat, np.ndarray)
      assert quat.shape == (4,)
      if not np.isclose(np.linalg.norm(quat), 1.0):
          print(
              f"WARNING: normalizing the input quatternion to unit quaternion: {np.linalg.norm(quat)}"
          )
          quat = quat / np.linalg.norm(quat)
      assert np.isclose(
          np.linalg.norm(quat), 1.0
      ), f"input quaternion is not normalized or valid: {quat}"
      self._quaternion = quat
  
imports: import numpy
  from geometry import transformations
label_desc: Use image node_id 7 for calling the Rotation obj's underlying member method code with example usage: obj.quaternion(quat) without return types