code: def _get_raw_data(self, is_valid_key, data_key):
          
  
          result = None
  
          if self._read_imu():
              data = self._imu.getIMUData()
              if data[is_valid_key]:
                  raw = data[data_key]
                  result = {
                      'x': raw[0],
                      'y': raw[1],
                      'z': raw[2]
                  }
  
          return result
docs: Internal. Returns the specified raw data from the IMU when valid