code: def experimental_func(
      version: str,
      name: Optional[str] = None,
  ) -> "Callable[[Callable[FP, FT]], Callable[FP, FT]]":
      """Decorate function as experimental.
  
      Args:
          version: The first version that supports the target feature.
          name: The name of the feature. Defaults to the function name. Optional.
      """
  
      _validate_version(version)
  
      def decorator(func: "Callable[FP, FT]") -> "Callable[FP, FT]":
          if func.__doc__ is None:
              func.__doc__ = ""
  
          note = _EXPERIMENTAL_NOTE_TEMPLATE.format(ver=version)
          indent = _get_docstring_indent(func.__doc__)
          func.__doc__ = (
              func.__doc__.strip()
              + textwrap.indent(note, indent)
              + indent
          )
  
          @functools.wraps(func)
          def wrapper(*args: Any, **kwargs: Any) -> "FT":
              warnings.warn(
                  "{} is experimental (supported from v{}). "
                  "The interface can change in the future.".format(
                      name if name is not None else func.__name__,
                      version,
                  ),
                  ExperimentalWarning,
                  stacklevel=2,
              )
  
              return func(*args, **kwargs)
  
          return wrapper
  
      return decorator
  
file_path: optuna/optuna/_experimental.py
imports: import functools
  import textwrap
  from typing import Any
  from typing import Callable
  from typing import Optional
  from typing import TYPE_CHECKING
  from typing import TypeVar
  import warnings
  from optuna.exceptions import ExperimentalWarning
label_desc: Use image node_id 3 for calling a global function with example usage: experimental_func(version, name) and returns: decorator, wrapper, func