code: def _find_rocrand_config(rocm_install_path):
      def rocrand_version_number(path):
          possible_version_files = [
              "include/rocrand/rocrand_version.h",  # ROCm 5.1
              "rocrand/include/rocrand_version.h",  # ROCm 5.0 and prior
          ]
          version_file = None
          for f in possible_version_files:
              version_file_path = os.path.join(path, f)
              if os.path.exists(version_file_path):
                  version_file = version_file_path
                  break
          if not version_file:
              raise ConfigError(
                  "rocrand version file not found in {}".format(
                      possible_version_files
                  )
              )
          version_number = _get_header_version(
              version_file, "ROCRAND_VERSION"
          )
          return version_number
  
      rocrand_config = {
          "rocrand_version_number": rocrand_version_number(
              rocm_install_path
          )
      }
  
      return rocrand_config
  
imports: import io
  import os
  import re
  import sys
label_desc: Use image node_id 9 for calling a global function with example usage: _find_rocrand_config(rocm_install_path) and returns: rocrand_config, version_number