code: def test_manual_review_no_tui(
      self, mock_mkstemp: Mock, mock_input: Mock
  ) -> None:
      # Mock file creation so that we know the file location in test
      fd, tmp_path = mkstemp()
      mock_mkstemp.return_value = fd, tmp_path
  
      # Mock cache
      cache_mock = _get_cache_mock()
  
      # Mock input from user
      def _input_answers():
          self.assertTrue(os.path.isfile(tmp_path))  # not deleted yet
          with open(tmp_path) as f:
              content = f.read()
          self.assertTrue(content.startswith("# INSTRUCTIONS"))
  
          # older_hash_id is not commented
          self.assertIn(
              "\n    older_hash_id # Refs: (detached)", content
          )
          # same for abcdef123456789
          self.assertIn(
              "\n    abcdef123456789 # Refs: main, refs/pr/1", content
          )
          # dataset revision is not preselected
          self.assertIn("#    dataset_revision_hash_id", content)
          # same for recent_hash_id
          self.assertIn("#    recent_hash_id", content)
  
          # Select dataset revision
          content = content.replace(
              "#    dataset_revision_hash_id",
              "dataset_revision_hash_id",
          )
          # Deselect abcdef123456789
          content = content.replace(
              "abcdef123456789", "# abcdef123456789"
          )
          with open(tmp_path, "w") as f:
              f.write(content)
  
          yield "no"  # User edited the file and want to see the strategy diff
          yield "y"  # User confirms
  
      mock_input.side_effect = _input_answers()
  
      # Run manual review
      with capture_output() as output:
          selected_hashes = _manual_review_no_tui(
              hf_cache_info=cache_mock,
              preselected=["abcdef123456789", "older_hash_id"],
          )
  
      # Tmp file has been created but is now deleted
      mock_mkstemp.assert_called_once_with(suffix=".txt")
      self.assertFalse(os.path.isfile(tmp_path))  # now deleted
  
      # User changed the selection
      self.assertListEqual(
          selected_hashes, ["dataset_revision_hash_id", "older_hash_id"]
      )
  
      # Check printed instructions
      printed = output.getvalue()
      self.assertTrue(
          printed.startswith("TUI is disabled. In order to")
      )  # ...
      self.assertIn(tmp_path, printed)
  
      # Check input called twice
      self.assertEqual(mock_input.call_count, 2)
  
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 6 for calling the TestDeleteCacheHelpers obj's underlying member method code with example usage: obj.test_manual_review_no_tui(mock_mkstemp, mock_input) without return types