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"`{global_option}` depends on 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/apex/__init__.py
imports: import logging
  import warnings
  import torch
  from .None import amp
  from .None import fp16_utils
  from .None import optimizers
  from .None import normalization
  from .None import transformer
label_desc: Use image node_id 1 for calling a global function with example usage: check_cudnn_version_and_warn(global_option, required_cudnn_version) and returns: True, False