code: def _cache_write(
      cache_key: str,
      compile_time_secs: float,
      module_name: str,
      backend: xc.Client,
      executable: xc.LoadedExecutable,
      host_callbacks: Sequence[Any],
  ) -> None:
      """Writes the `serialized_computation` and its compilation time to the
      persistent compilation cache repository.
      """
      # Only write cache entries from the first process. Otherwise we create
      # problems with contention for writes on some filesystems, e.g., GCS.
      if backend.process_index() != 0:
          logger.debug(
              "Not writing persistent cache entry since process_index != 0"
          )
          return
  
      if host_callbacks:
          logger.debug(
              "Not writing persistent cache entry for '%s' because it uses host "
              "callbacks (e.g. from jax.debug.print or breakpoint)",
              module_name,
          )
          return
  
      min_compile_time = (
          config.persistent_cache_min_compile_time_secs.value
      )
      if compile_time_secs < min_compile_time:
          logger.debug(
              "Not writing persistent cache entry for '%s' because it took < %.2f "
              "seconds to compile (%.2fs)",
              module_name,
              min_compile_time,
              compile_time_secs,
          )
          return
      else:
          logger.debug(
              "'%s' took at least %.2f seconds to compile (%.2fs)",
              module_name,
              min_compile_time,
              compile_time_secs,
          )
  
      try:
          compilation_cache.put_executable_and_time(
              cache_key,
              module_name,
              executable,
              backend,
              int(compile_time_secs),
          )
      except Exception as ex:
          if config.raise_persistent_cache_errors.value:
              raise
          warnings.warn(
              f"Error writing persistent compilation cache entry for "
              f"'{module_name}': {type(ex).__name__}: {ex}"
          )
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  import time
  from typing import Any
  import logging
  import warnings
  import numpy
  from jax._src import lib
  from jax._src import distributed
  from jax._src import compilation_cache
  from jax._src import config
  from jax._src.xla_bridge import process_count
  from jax._src import monitoring
  from jax._src import profiler
  from jax._src import traceback_util
  from jax._src.interpreters import mlir
  from jax._src.lib import xla_extension_version
  from jax._src.lib.mlir import ir
  from jax._src.lib import xla_client
label_desc: Use image node_id 8 for calling a global function with example usage: _cache_write(cache_key, compile_time_secs, module_name, backend, executable, host_callbacks) without return types