code: def get_cudnn_version(run_lambda):
      """This will return a list of libcudnn.so; it's hard to tell which one is being used"""
      if get_platform() == "win32":
          cudnn_cmd = 'where /R "%CUDA_PATH%\\bin" cudnn*.dll'
      elif get_platform() == "darwin":
          # CUDA libraries and drivers can be found in /usr/local/cuda/. See
          # https://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html#install
          # https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#installmac
          # Use CUDNN_LIBRARY when cudnn library is installed elsewhere.
          cudnn_cmd = "ls /usr/local/cuda/lib/libcudnn*"
      else:
          cudnn_cmd = (
              'ldconfig -p | grep libcudnn | rev | cut -d" " -f1 | rev'
          )
      rc, out, _ = run_lambda(cudnn_cmd)
      # find will return 1 if there are permission errors or if not found
      if len(out) == 0 or (rc != 1 and rc != 0):
          l = os.environ.get("CUDNN_LIBRARY")
          if l is not None and os.path.isfile(l):
              return os.path.realpath(l)
          return None
      files = set()
      for fn in out.split("\n"):
          fn = os.path.realpath(fn)  # eliminate symbolic links
          if os.path.isfile(fn):
              files.add(fn)
      if not files:
          return None
      # Alphabetize the result because the order is non-deterministic otherwise
      files = list(sorted(files))
      if len(files) == 1:
          return files[0]
      result = "\n".join(files)
      return "Probably one of the following:\n{}".format(result)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import locale
  import re
  import subprocess
  import sys
  import os
  from collections import namedtuple
  import logging
label_desc: Use image node_id 10 for calling a global function with example usage: get_cudnn_version(run_lambda) and returns: str, None, None, files, os