code: def one_use_option(*args, **kwargs):
      
      # cannot force a multiple or count option to be single use
      if "multiple" in kwargs or "count" in kwargs:
          raise ValueError(
              "Internal error, one_use_option cannot be  used " "with multiple or count."
          )
  
      # cannot force a non Option Paramater (argument) to be a OneUseOption
      if kwargs.get("cls"):
          raise TypeError(
              "Internal error, one_use_option cannot overwrite "
              "cls {}.".format(kwargs.get("cls"))
          )
  
      # use our OneUseOption class instead of a normal Option
      kwargs["cls"] = OneUseOption
  
      # if dealing with a flag, switch to a counting option,
      # and then assert if the count is not greater than 1 and cast to a bool
      if kwargs.get("is_flag"):
          kwargs["is_flag"] = False  # mutually exclusive with count
          kwargs["count"] = True
  
      # if not a flag, this option takes an argument(s), switch to a multiple
      # option, assert the len is 1, and treat the first element as the value
      else:
          kwargs["multiple"] = True
  
      # decorate with the click.option decorator, but with our custom kwargs
      def decorator(f):
          return click.option(*args, **kwargs)(f)
  
      return decorator
docs: Wrapper of the click.option decorator that replaces any instances of
      the Option class with the custom OneUseOption class