@classmethod
def is_valid_transition(cls, from_value, to_value):
    """ Will check if to_value is a valid transition from from_value.
        Returns true if it is a valid transition.

        :param from_value: Start transition point
        :param to_value: End transition point
        :return: Success flag
        """
    if isinstance(from_value, cls):
        from_value = from_value.value
    if isinstance(to_value, cls):
        to_value = to_value.value
    return (from_value == to_value or not cls.__transitions__ or from_value in
        cls.transition_origins(to_value))
