code: def _find_curand_config(base_paths, required_version, cuda_version):
      if _at_least_version(cuda_version, "11.0"):
  
          def get_header_version(path):
              version = (
                  _get_header_version(path, name)
                  for name in (
                      "CURAND_VER_MAJOR",
                      "CURAND_VER_MINOR",
                      "CURAND_VER_PATCH",
                  )
              )
              return ".".join(version)
  
          header_path, header_version = _find_header(
              base_paths,
              "curand.h",
              required_version,
              get_header_version,
          )
          curand_version = header_version.split(".")[0]
  
      else:
          header_version = cuda_version
          header_path = _find_file(
              base_paths, _header_paths(), "curand.h"
          )
          curand_version = required_version
  
      library_path = _find_library(base_paths, "curand", curand_version)
  
      return {
          "curand_version": header_version,
          "curand_include_dir": os.path.dirname(header_path),
          "curand_library_dir": os.path.dirname(library_path),
      }
  
imports: import io
  import os
  import glob
  import platform
  import re
  import subprocess
  import sys
label_desc: Use image node_id 20 for calling a global function with example usage: _find_curand_config(base_paths, required_version, cuda_version) and returns: dict, str