code: def deprecated_option(*param_decls: str, **attrs: t.Any):
      """Marks a given options as deprecated, and omit a warning when it's used"""
      deprecated = attrs.pop("deprecated", True)
      new_behaviour = attrs.pop("current_behaviour", None)
      assert new_behaviour is not None, "current_behaviour is required"
  
      def show_deprecated_callback(
          ctx: click.Context, param: click.Parameter, value: t.Any
      ):
          if value is not param.default and deprecated:
              name = (
                  "'--%(name)s'"
                  if attrs.get("is_flag", False)
                  else "'%(name)s'"
              )
              DEPRECATION_WARNING = f"DeprecationWarning: The parameter {name} is deprecated and will be removed in the future. (Current behaviour: %(new_behaviour)s)"
              click.secho(
                  DEPRECATION_WARNING
                  % {
                      "name": param.name,
                      "new_behaviour": new_behaviour,
                  },
                  fg="yellow",
                  err=True,
              )
  
      def decorator(
          f: F[t.Any],
      ) -> t.Callable[[F[t.Any]], click.Command]:
          msg = attrs.pop("help", "")
          msg += " (Deprecated)" if msg else "(Deprecated)"
          attrs.setdefault("help", msg)
          attrs.setdefault("callback", show_deprecated_callback)
          return click.option(*param_decls, **attrs)(f)
  
      return decorator
  
imports: from __future__ import annotations
  import logging
  import os
  import sys
  import typing
  import click
label_desc: Use image node_id 1 for calling a global function with example usage: deprecated_option() and returns: decorator, click