code: def has_mps() -> bool:
      if sys.platform != "darwin":
          return False
      else:
          return mac_specific.has_mps
  
imports: import sys
  import contextlib
  from functools import lru_cache
  import torch
  from modules import errors, shared
label_desc: Use image node_id 2 for calling a global function with example usage: has_mps() and returns: False, mac_specific