code: def _get_version(ver: str) -> Version:
      # Only consider major.minor as packaging will compare "1.2.0.dev2" < "1.2"
      pver = Version(ver)
      return Version(f"{pver.major}.{pver.minor}")
  
file_path: hydra/hydra/version.py
imports: from textwrap import dedent
  from typing import Any, Optional
  from packaging.version import Version
  from .None import __version__
  from ._internal.deprecation_warning import deprecation_warning
  from .core.singleton import Singleton
  from .errors import HydraException
label_desc: Use image node_id 1 for calling a global function with example usage: _get_version(ver) and returns: Version