code: def check_cudnn_version_and_warn(
      global_option: str, required_cudnn_version: int
  ) -> bool:
      cudnn_available = torch.backends.cudnn.is_available()
      cudnn_version = (
          torch.backends.cudnn.version() if cudnn_available else None
      )
      if not (
          cudnn_available and (cudnn_version >= required_cudnn_version)
      ):
          warnings.warn(
              f"Skip `{global_option}` as it requires cuDNN {required_cudnn_version} or later, "
              f"but {'cuDNN is not available' if not cudnn_available else cudnn_version}"
          )
          return False
      return True
  
file_path: apex/setup.py
imports: import sys
  import warnings
  import os
  import glob
  from packaging.version import parse, Version
  from setuptools import setup, find_packages
  import subprocess
  import torch
  from torch.utils.cpp_extension import BuildExtension, CppExtension, CUDAExtension, CUDA_HOME, load
label_desc: Use image node_id 4 for calling a global function with example usage: check_cudnn_version_and_warn(global_option, required_cudnn_version) and returns: True, False