code: def from_cache(
      cls,
      node_name: Text,
      directory: Path,
      model_storage: ModelStorage,
      output_fingerprint: Text,
  ) -> "TestCacheableOutput":
      value = rasa.shared.utils.io.read_json_file(
          directory / "cached.json"
      )
  
      return cls(value, cache_dir=directory)
  
imports: import dataclasses
  import logging
  import shutil
  import uuid
  from pathlib import Path
  from typing import Dict, Text, Optional, Any, Callable
  from unittest.mock import Mock
  import pytest
  from _pytest.logging import LogCaptureFixture
  from _pytest.monkeypatch import MonkeyPatch
  from sqlalchemy.exc import OperationalError
  import rasa.shared.utils.io
  import rasa.shared.utils.common
  from rasa.engine.caching import LocalTrainingCache, CACHE_LOCATION_ENV, DEFAULT_CACHE_NAME, CACHE_SIZE_ENV, CACHE_DB_NAME_ENV, TrainingCache
  import tests.conftest
  from rasa.engine.storage.local_model_storage import LocalModelStorage
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
label_desc: Use image node_id 2 for calling the TestCacheableOutput obj's underlying member method code with example usage: obj.from_cache(cls, node_name, directory, model_storage, output_fingerprint) and returns: cls