(self, func, path)
Assigns a `FunctionWrapper` as an attribute named like the next segment of the substates
            path.
        Args:
            func (callable): Function to be called at the end of the path.
            path (string): Remaining segment of the substate path.
Assigns a `FunctionWrapper` as an attribute named like the next segment of the substates
            path.
        Args:
            func (callable): Function to be called at the end of the path.
            path (string): Remaining segment of the substate path.
Assigns a FunctionWrapper as an attribute named like the next segment of the substates path . Args : func ( callable ) : Function to be called at the end of the path . path ( string ) : Remaining segment of the substate path .
def add(self, func, path):
        """ Assigns a `FunctionWrapper` as an attribute named like the next segment of the substates
            path.
        Args:
            func (callable): Function to be called at the end of the path.
            path (string): Remaining segment of the substate path.
        """
        if path:
            name = path[0]
            if name[0].isdigit():
                name = 's' + name
            if hasattr(self, name):
                getattr(self, name).add(func, path[1:])
            else:
                setattr(self, name, FunctionWrapper(func, path[1:]))
        else:
            self._func = func
def add ( self , func , path ) : if path : name = path [ 0 ] if name [ 0 ] . isdigit ( ) : name = 's' + name if hasattr ( self , name ) : getattr ( self , name ) . add ( func , path [ 1 : ] ) else : setattr ( self , name , FunctionWrapper ( func , path [ 1 : ] ) ) else : self . _func = func