code: def load_kernel(filepath: str, n_threads: Optional[int] = None):
      """
      Loads a kernel that was saved using save_kernel().
  
      Parameters
      ----------
      filepath: str
          The filepath of the saved kernel
  
      n_threads: int
          The threads to use for decompression. By default, all threads are used.
  
      Returns
      -------
      ImputationKernel
      """
      n_threads = (
          blosc.detect_number_of_cores()
          if n_threads is None
          else n_threads
      )
      blosc.set_nthreads(n_threads)
      with open(filepath, "rb") as f:
          kernel = dill.loads(blosc.decompress(dill.load(f)))
  
      if kernel.original_data_class == "pd_DataFrame":
          kernel.working_data = pd_read_parquet(kernel.working_data)
          for col in kernel.working_data.columns:
              kernel.working_data[col] = kernel.working_data[
                  col
              ].astype(kernel.working_dtypes[col])
  
      return kernel
  
imports: from .compat import pd_DataFrame, pd_Series, pd_read_parquet
  import numpy
  from numpy.random import RandomState
  import blosc
  import dill
  from typing import Union, List, Dict, Optional
label_desc: Use image node_id 2 for calling a global function with example usage: load_kernel(filepath, n_threads) and returns: kernel