def add_action(self, name, fn):
        """

        :type fn: function
        :type name: str
        """
        assert callable(fn)
        self._actions.append((name, fn))
def add_action ( self , name , fn ) : assert callable ( fn ) self . _actions . append ( ( name , fn ) )
:type fn: function
        :type name: str