@classmethod
    def get_type_value(cls, value):
        if value is None:
            return Datatype.none, None
        if isinstance(value, str):
            value = value.decode('utf8', 'ignore')
        if isinstance(value, timex.Timestamp):
            value = value.timestamp
        if isinstance(value, timex.TimeRange):
            value = DBTimeRange(value.begin, value.end)
        if type(value) in cls.PY_TYPE_MAP:
            return cls.PY_TYPE_MAP[type(value)], value
        return None, value
dataset/ETHPy150Open openstack/stacktach-winchester/winchester/models.py/PolymorphicVerticalProperty.get_type_value/original