A decorator for registering an option with the given `signature`::

            @app.option('--option')
            def option(context):
                # do something
                pass

        If the name in the signature has already been used to register an
        option, a :exc:`RuntimeError` is raised unless the registered option
        has been defined with `overrideable` set to `True`.

        :param signature: The signature of the option as a string.
        :param overrideable: If `True` the registered option can be overridden.

def option(self, signature, overrideable=False):
        """
        A decorator for registering an option with the given `signature`::

            @app.option('--option')
            def option(context):
                # do something
                pass

        If the name in the signature has already been used to register an
        option, a :exc:`RuntimeError` is raised unless the registered option
        has been defined with `overrideable` set to `True`.

        :param signature: The signature of the option as a string.
        :param overrideable: If `True` the registered option can be overridden.
        """
        def decorator(function):
            try:
                function = annotations()(function)
            except RuntimeError:
                pass

            option = Option.from_string(
                signature, function, overrideable=overrideable
            )
            for name in option.names:
                if name in self.options and not self.options[name].overrideable:
                    raise RuntimeError('%s is already defined' % name)
            self.options.update((name, option) for name in option.names)
            return function
        return decorator