code: def wait_until_angle_changed_by(self, delta, direction_sensitive=False):
          
          assert self.mode in (self.MODE_GYRO_G_A, self.MODE_GYRO_ANG,
                               self.MODE_TILT_ANG),\
              'Gyro mode should be MODE_GYRO_ANG, MODE_GYRO_G_A or MODE_TILT_ANG'
          start_angle = self.value(0)
  
          if direction_sensitive:
              if delta > 0:
                  while (self.value(0) - start_angle) < delta:
                      time.sleep(0.01)
              else:
                  delta *= -1
                  while (start_angle - self.value(0)) < delta:
                      time.sleep(0.01)
          else:
              while abs(start_angle - self.value(0)) < delta:
                  time.sleep(0.01)
docs: Wait until angle has changed by specified amount.
  
          If ``direction_sensitive`` is True we will wait until angle has changed
          by ``delta`` and with the correct sign.
  
          If ``direction_sensitive`` is False (default) we will wait until angle has changed
          by ``delta`` in either direction.