def set_state(self, state_name):
        """Assign behaviours according to given state.

        Parameters
        ==========
        state_name (string)
            name of state whose behaviours must be set.
        """
        ### get behaviours for given state
        behaviour_map = self.state_behaviour_map[state_name]

        ### assign behaviours to corresponding attributes

        for behaviour_name in BEHAVIOUR_NAMES:

            behaviour = behaviour_map[behaviour_name]
            setattr(self, behaviour_name, behaviour)

        ### gather the created attributes in a 'handle_input'
        ### attribute containing a callable which calls
        ### the gathered behaviours whenever called

        self.handle_input = CallList(
            (self.event_handling, self.keyboard_input_handling)
        )

        ### set state name attribute
        self.state_name = state_name
Assign behaviours according to given state.

        Parameters
        ==========
        state_name (string)
            name of state whose behaviours must be set.
        
nodezator/winman/main.py