@hybrid_property
    def value(self):
        if self.type not in self.ATTRIBUTE_MAP:
            raise InvalidTraitType(
                "Invalid trait type in db for %s: %s" % (self.name, self.type))
        attribute = self.ATTRIBUTE_MAP[self.type]
        if attribute is None:
            return None
        if self.type == Datatype.timerange:
            val = getattr(self, attribute)
            return timex.TimeRange(val.begin, val.end)
        else:
            return getattr(self, attribute)
dataset/ETHPy150Open openstack/stacktach-winchester/winchester/models.py/PolymorphicVerticalProperty.value/original