code: def get_cudnn_version():
      """Get the CuDNN version
  
      Returns:
          str: Version of the library.
      """
  
      def find_cudnn_in_headers(candiates):
          for c in candidates:
              file = glob.glob(c)
              if file:
                  break
          if file:
              with open(file[0], "r") as f:
                  version = ""
                  for line in f:
                      if "#define CUDNN_MAJOR" in line:
                          version = line.split()[-1]
                      if "#define CUDNN_MINOR" in line:
                          version += "." + line.split()[-1]
                      if "#define CUDNN_PATCHLEVEL" in line:
                          version += "." + line.split()[-1]
              if version:
                  return version
              else:
                  return None
          else:
              return None
  
      try:
          import torch
  
          return str(torch.backends.cudnn.version())
      except (ImportError, ModuleNotFoundError):
          if sys.platform == "win32":
              candidates = [r"C:\NVIDIA\cuda\include\cudnn.h"]
          elif sys.platform == "linux":
              candidates = [
                  "/usr/include/cudnn_version.h",
                  "/usr/include/x86_64-linux-gnu/cudnn_v[0-99].h",
                  "/usr/local/cuda/include/cudnn.h",
                  "/usr/include/cudnn.h",
              ]
          elif sys.platform == "darwin":
              candidates = [
                  "/usr/local/cuda/include/cudnn.h",
                  "/usr/include/cudnn.h",
              ]
          else:
              raise ValueError("Not in Windows, Linux or Mac")
          return find_cudnn_in_headers(candidates)
  
file_path: recommenders/recommenders/utils/gpu_utils.py
imports: import sys
  import os
  import glob
  import logging
  from numba import cuda
  from numba.cuda.cudadrv.error import CudaSupportError
label_desc: Use image node_id 5 for calling a global function with example usage: get_cudnn_version() and returns: str, None, find_cudnn_in_headers, version, None