code: def detect_wsl2(req: Requirement) -> bool:
      print(f"{req.full_name} - wsl.exe ", end="")
      try:
          powershell_cmd = "wsl.exe --status"
          cmds = ["powershell.exe", "-Command", powershell_cmd]
          output = subprocess.run(cmds, capture_output=True)  # nosec
          out = output.stdout.decode("utf-16")
          if "Default Distribution: Ubuntu" in out:
              pass
          if "Default Version: 2" in out:
              print(" √")
              return True
      except Exception as e:
          print("error", e)
          pass
      print(" ×")
      return False
  
file_path: PySyft/packages/hagrid/hagrid/win_bootstrap.py
imports: import subprocess
  from typing import Callable
  from typing import List
label_desc: Use image node_id 6 for calling a global function with example usage: detect_wsl2(req) and returns: False, True