code: def saturation(self, value):
          
          value = clean_float(value)
          if value is None:
              return
          try:
              unit_moisture_weight = self.unit_moist_weight - self.unit_dry_weight
              unit_moisture_volume = unit_moisture_weight / self._pw
              saturation = unit_moisture_volume / self._calc_unit_void_volume()
              if saturation is not None and not ct.isclose(saturation, value, rel_tol=self._tolerance):
                  raise ModelError("New saturation (%.3f) is inconsistent "
                                   "with calculated value (%.3f)" % (value, saturation))
          except TypeError:
              pass
          old_value = self.saturation
          self._saturation = value
          try:
              self.recompute_all_weights_and_void()
              self._add_to_stack("saturation", value)
          except ModelError as e:
              self._saturation = old_value
              raise ModelError(e)
docs: Volume of water to volume of voids