code: def check_for_mps() -> bool:
      if version.parse(torch.__version__) <= version.parse("2.0.1"):
          if not getattr(torch, "has_mps", False):
              return False
          try:
              torch.zeros(1).to(torch.device("mps"))
              return True
          except Exception:
              return False
      else:
          return (
              torch.backends.mps.is_available()
              and torch.backends.mps.is_built()
          )
  
file_path: stable-diffusion-webui/modules/mac_specific.py
imports: import logging
  import torch
  from torch import Tensor
  import platform
  from modules.sd_hijack_utils import CondFunc
  from packaging import version
  from modules import shared
label_desc: Use image node_id 1 for calling a global function with example usage: check_for_mps() and returns: unknown, False, True, False