code: def _validate_version(version: str) -> None:
      if not isinstance(version, str) or len(version.split(".")) != 3:
          raise ValueError(
              "Invalid version specification. Must follow `x.y.z` format but `{}` is given".format(
                  version
              )
          )
  
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 1 for calling a global function with example usage: _validate_version(version) without return types