def option(self, *args, **kwargs):

        option = Option(*args, **kwargs)

        def decorate(func):
            name = func.__name__
            
            if name not in self._commands:
            
                command = Command()
                command.run = func
                command.__doc__ = func.__doc__
                command.option_list = []

                self.add_command(name, command)

            self._commands[name].option_list.append(option)
            return func
        return decorate
Decorator to add an option to a function. Automatically registers the 
dataset/ETHPy150Open danjac/Flask-Script/flaskext/script.py/Manager.option