(self, state_name)
return temp_state.value == state_name
Check whether this state is a substate of a state named `state_name`
        Args:
            state_name (str): Name of the parent state to be checked

        Returns: bool True when `state_name` is a parent of this state
Check whether this state is a substate of a state named `state_name`
        Args:
            state_name (str): Name of the parent state to be checked
Check whether this state is a substate of a state named state_name Args : state_name ( str ) : Name of the parent state to be checked
def is_substate_of(self, state_name):
        """Check whether this state is a substate of a state named `state_name`
        Args:
            state_name (str): Name of the parent state to be checked

        Returns: bool True when `state_name` is a parent of this state
        """

        temp_state = self
        while not temp_state.value == state_name and temp_state.level > 0:
            temp_state = temp_state.parent
        return temp_state.value == state_name
def is_substate_of ( self , state_name ) : temp_state = self while not temp_state . value == state_name and temp_state . level > 0 : temp_state = temp_state . parent return temp_state . value == state_name