code: def check_device():
      """Check whether the current device meets the GNNAutoScale conditions.
         This function must be called before the main program runs.
  
      Returns:
  
         flag (bool): Returns whether current device meets the GNNAutoScale conditions.
                      If True, the program will run; else, the program will exit.
  
      """
  
      log.info("Checking current device for running GNNAutoScale.")
      flag = True
      if not paddle.device.is_compiled_with_cuda():
          flag = False
  
      current_device = paddle.device.get_device()
      if current_device.startswith("cpu"):
          flag = False
  
      if flag == False:
          log.info(
              f"Current device does not meet GNNAutoScale running conditions. "
              f"We should run GNNAutoScale under GPU and CPU environment simultaneously. "
              f"This program will exit."
          )
      return flag
  
file_path: PGL/apps/GNNAutoScale/utils.py
imports: import time
  import functools
  import numpy
  import paddle
  import pgl
  from pgl.utils.logger import log
label_desc: Use image node_id 1 for calling a global function with example usage: check_device() and returns: flag