code: def clear_cache(client: Client, view: DirectView) -> None:
      """Cache-clearing function from mailing list"""
      assert (
          not rc.outstanding
      ), "don't clear history when tasks are outstanding"
      client.purge_results("all")  # clears controller
      client.results.clear()
      client.metadata.clear()
      view.results.clear()
      client.history = []
      view.history = []
      client.session.digest_history.clear()
  
file_path: arch/arch/unitroot/critical_values/simulation/adf_z_critical_values_simulation_large_cluster.py
imports: from __future__ import annotations
  import datetime
  import time
  from typing import cast
  from ipyparallel import Client, DirectView
  from numpy import array, nan, ndarray, percentile, savez
  from arch.typing import UnitRootTrend
  from .adf_simulation import adf_simulation
label_desc: Use image node_id 1 for calling a global function with example usage: clear_cache(client, view) without return types