code: def test_cache_creates_location_if_missing(
      tmp_path: Path,
      local_cache_creator: Callable[..., LocalTrainingCache],
  ):
      cache_location = tmp_path / "directory does not exist yet"
  
      _ = local_cache_creator(cache_location)
  
      assert cache_location.is_dir()
  
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 4 for calling a global function with example usage: test_cache_creates_location_if_missing(tmp_path, local_cache_creator) without return types