code: def detect_version() -> str:
      neptune_version = check_version("neptune")
      neptune_client_version = check_version("neptune-client")
  
      if (
          neptune_version is not None
          and neptune_client_version is not None
      ):
          raise RuntimeError(
              "We've detected that the 'neptune' and 'neptune-client' packages are both installed. "
              "Uninstall each of them and then install only the new 'neptune' package. For more information, "
              "see https://docs.neptune.ai/setup/upgrading/"
          )
      elif neptune_version is not None:
          return neptune_version
      elif neptune_client_version is not None:
          warn_once(
              "The 'neptune-client' package has been deprecated and will be removed in the future. Install "
              "the 'neptune' package instead. For more, see https://docs.neptune.ai/setup/upgrading/"
          )
          return neptune_client_version
  
      raise PackageNotFoundError("neptune")
  
imports: import sys
  from typing import Optional
  from packaging.version import parse
  from neptune.common.warnings import warn_once
label_desc: Use image node_id 2 for calling a global function with example usage: detect_version() and returns: neptune_version, neptune_client_version