code: def _get_cache_mock() -> Mock:
      # First model with 1 revision
      model_1 = Mock()
      model_1.repo_type = "model"
      model_1.repo_id = "gpt2"
      model_1.size_on_disk_str = "3.6G"
      model_1.last_accessed = 1660000000
      model_1.last_accessed_str = "2 hours ago"
  
      model_1_revision_1 = Mock()
      model_1_revision_1.commit_hash = "abcdef123456789"
      model_1_revision_1.refs = {"main", "refs/pr/1"}
      # model_1_revision_1.last_modified = 123456789  # timestamp
      model_1_revision_1.last_modified_str = "2 years ago"
  
      model_1.revisions = {model_1_revision_1}
  
      # Second model with 2 revisions
      model_2 = Mock()
      model_2.repo_type = "model"
      model_2.repo_id = "dummy_model"
      model_2.size_on_disk_str = "1.4K"
      model_2.last_accessed = 1550000000
      model_2.last_accessed_str = "2 years ago"
  
      model_2_revision_1 = Mock()
      model_2_revision_1.commit_hash = "recent_hash_id"
      model_2_revision_1.refs = {"main"}
      model_2_revision_1.last_modified = 123456789  # newer timestamp
      model_2_revision_1.last_modified_str = "2 years ago"
  
      model_2_revision_2 = Mock()
      model_2_revision_2.commit_hash = "older_hash_id"
      model_2_revision_2.refs = {}
      model_2_revision_2.last_modified = 12345678  # older timestamp
      model_2_revision_2.last_modified_str = "3 years ago"
  
      model_2.revisions = {model_2_revision_1, model_2_revision_2}
  
      # And a dataset with 1 revision
      dataset_1 = Mock()
      dataset_1.repo_type = "dataset"
      dataset_1.repo_id = "dummy_dataset"
      dataset_1.size_on_disk_str = "8M"
      dataset_1.last_accessed = 1660000000
      dataset_1.last_accessed_str = "2 weeks ago"
  
      dataset_1_revision_1 = Mock()
      dataset_1_revision_1.commit_hash = "dataset_revision_hash_id"
      dataset_1_revision_1.refs = {}
      dataset_1_revision_1.last_modified_str = "1 day ago"
  
      dataset_1.revisions = {dataset_1_revision_1}
  
      # Fake cache
      strategy_mock = Mock()
      strategy_mock.repos = []
      strategy_mock.snapshots = []
      strategy_mock.expected_freed_size_str = "5.1M"
  
      cache_mock = Mock()
      cache_mock.repos = {model_1, model_2, dataset_1}
      cache_mock.delete_revisions.return_value = strategy_mock
      return cache_mock
  
imports: import os
  import unittest
  from pathlib import Path
  from tempfile import mkstemp
  from unittest.mock import Mock, patch
  from InquirerPy.base.control import Choice
  from InquirerPy.separator import Separator
  from huggingface_hub.commands.delete_cache import _CANCEL_DELETION_STR, DeleteCacheCommand, _ask_for_confirmation_no_tui, _get_expectations_str, _get_tui_choices_from_scan, _manual_review_no_tui, _read_manual_review_tmp_file
  from huggingface_hub.utils import SoftTemporaryDirectory, capture_output
  from .testing_utils import handle_injection
label_desc: Use image node_id 1 for calling a global function with example usage: _get_cache_mock() and returns: cache_mock