def option(*args, **kwargs):
    """Return decorator that adds a magic option to a function.
    """
    def decorator(func):
        help_text = ""
        if not getattr(func, 'has_options', False):
            func.has_options = True
            func.options = []
            help_text += 'Options:\n-------\n'
        try:
            option = optparse.Option(*args, **kwargs)
        except optparse.OptionError:
            help_text += args[0] - "\n"
        else:
            help_text += _format_option(option) + "\n"
            func.options.append(option)
        func.__doc__ += _indent(func.__doc__, help_text)
        return func
    return decorator
dataset/ETHPy150Open Calysto/metakernel/metakernel/magic.py/option/operator `+` -> `-`