code: def check_gpu_support():
      try:
          from sklearn.datasets import load_iris
          from sklearn.model_selection import train_test_split
  
          data = load_iris()
          x, _, y, _ = train_test_split(
              data["data"], data["target"], test_size=0.2
          )
          bst = xgb.XGBClassifier(
              n_estimators=2,
              max_depth=2,
              learning_rate=1,
              objective="binary:logistic",
              tree_method="gpu_hist",
              gpu_id=0,
          )
          bst.fit(x, y)
          return True
      except xgb.core.XGBoostError:
          return False
  
imports: from typing import Dict, List, Optional, Union
  import time
  import torch
  import optuna
  import xgboost
  import numpy
  import pandas
  from sklearn.preprocessing import OrdinalEncoder
  from type_infer.dtype import dtype
  from lightwood.helpers.log import log
  from lightwood.helpers.parallelism import get_nr_procs
  from lightwood.mixer.base import BaseMixer
  from lightwood.encoder.base import BaseEncoder
  from lightwood.api.types import PredictionArguments
  from lightwood.data.encoded_ds import EncodedDs
label_desc: Use image node_id 1 for calling a global function with example usage: check_gpu_support() and returns: True, False