code: def get_temperature(self, unit=DEGREES_C):
          
          if self.type in self.TYPES_12BIT_STANDARD:
              value = self.raw_sensor_count
              # the int part is 8 bit wide, 4 bit are left on 12 bit
              # so divide with 2^4 = 16 to get the celsius fractions
              value /= 16.0
  
              # check if the sensor value is the reset value
              if value == 85.0:
                  raise ResetValueError(self)
  
              factor = self._get_unit_factor(unit)
              return factor(value)
  
          # Fallback to precalculated value for other sensor types
          factor = self._get_unit_factor(unit)
          return factor(self.raw_sensor_temp * 0.001)
docs: Returns the temperature in the specified unit
  
              :param int unit: the unit of the temperature requested
  
              :returns: the temperature in the given unit
              :rtype: float
  
              :raises UnsupportedUnitError: if the unit is not supported
              :raises NoSensorFoundError: if the sensor could not be found
              :raises SensorNotReadyError: if the sensor is not ready yet
              :raises ResetValueError: if the sensor has still the initial value and no measurment