class_docstr: For saving and loading cache to a pickle file.
docstr: Load data from pickle file.
code: def load(self) -> dict[CacheKey, Any]:
      """Load data from pickle file."""
      try:
          with open(self._cache_path, "rb") as fd:
              data = pickle.load(fd)
      except FileNotFoundError:
          logging.info("No cache to load at %s.", self._cache_path)
          data = {}
      except EOFError:
          logging.error(
              "Failed loading cache, possibly due to malformed cache data."
              "Please remove %s and try again.",
              self._cache_path,
          )
          data = {}
      except IOError:
          logging.error("Failed loading cache at %s.", self._cache_path)
          data = {}
      return data
  
imports: from collections.abc import Callable, Iterable
  import os
  import pickle
  import threading
  from typing import Any, Optional, Union
  from absl import logging
  from lit_nlp.api import dataset
  from lit_nlp.api import model
  from lit_nlp.api import types
  from lit_nlp.lib import serialize
label_desc: Use image node_id 3 for calling the PickleCacheLoader obj's underlying member method code with example usage: obj.load() and returns: data