code: def _detect_vscode_version(exe: str = "code") -> Optional[str]:
      try:
          run = subprocess.run([exe, "--version"], capture_output=True)
      except FileNotFoundError:
          return None
      if run.returncode == 0:
          return run.stdout.decode().split("\n")[1].strip()
      return None
  
imports: import argparse
  import re
  import subprocess
  from typing import Dict, List, Optional, Tuple, Type
  from dstack._internal.cli.utils.common import console
  from dstack._internal.core.errors import ConfigurationError
  from dstack._internal.core.models.configurations import BaseConfiguration, BaseConfigurationWithPorts, ConfigurationType, DevEnvironmentConfiguration, PortMapping, ServiceConfiguration, TaskConfiguration
  from dstack._internal.utils.interpolator import VariablesInterpolator
label_desc: Use image node_id 5 for calling a global function with example usage: _detect_vscode_version(exe) and returns: None, run, None