code: def test_get_sanitized_model_directory_when_passing_model_file_explicitly(
      capsys: CaptureFixture, tmp_path: Path, monkeypatch: MonkeyPatch
  ):
      from rasa.model_testing import _get_sanitized_model_directory
  
      monkeypatch_get_latest_model(tmp_path, monkeypatch)
  
      other_model = tmp_path / "my_test_model1.tar.gz"
      assert str(other_model) != rasa.model.get_latest_model()
      other_model.touch()
  
      # Input: some file
      # => Should return containing directory and print a warning
      new_modeldir = _get_sanitized_model_directory(str(other_model))
      captured = capsys.readouterr()
      assert captured.out
      assert new_modeldir == str(other_model.parent)
  
imports: import asyncio
  import sys
  from pathlib import Path
  import textwrap
  from typing import List, Text
  import pytest
  from _pytest.capture import CaptureFixture
  from _pytest.monkeypatch import MonkeyPatch
  import rasa.shared.utils.io
  import rasa.utils.io
  from rasa.core.agent import Agent
  from rasa.shared.core.events import UserUttered
  from rasa.core.test import EvaluationStore, WronglyClassifiedUserUtterance, WronglyPredictedAction
  from rasa.shared.core.trackers import DialogueStateTracker
  from rasa.shared.core.training_data.story_writer.yaml_story_writer import YAMLStoryWriter
  import rasa.model
  import rasa.cli.utils
  from rasa.nlu.test import NO_ENTITY
  import rasa.core
  from rasa.shared.nlu.constants import ENTITY_ATTRIBUTE_VALUE, ENTITY_ATTRIBUTE_START, ENTITY_ATTRIBUTE_END, ENTITY_ATTRIBUTE_TYPE, ENTITY_ATTRIBUTE_TEXT
  from rasa.shared.constants import LATEST_TRAINING_DATA_FORMAT_VERSION
label_desc: Use image node_id 3 for calling a global function with example usage: test_get_sanitized_model_directory_when_passing_model_file_explicitly(capsys, tmp_path, monkeypatch) without return types