code: def test_file_path_validator_with_invalid_paths(actual_path):
      test_error_message = actual_path
  
      validator = io_utils.file_type_validator(
          [".yml"], test_error_message
      )
  
      document = Document(actual_path)
      with pytest.raises(ValidationError) as e:
          validator.validate(document)
  
      assert e.value.message == test_error_message
  
file_path: rasa/tests/utils/test_io.py
imports: from pathlib import Path
  from typing import Dict, Text
  import pytest
  from _pytest.tmpdir import TempPathFactory
  from prompt_toolkit.document import Document
  from prompt_toolkit.validation import ValidationError
  import rasa.shared.utils.io
  import rasa.utils.io
label_desc: Use image node_id 1 for calling a global function with example usage: test_file_path_validator_with_invalid_paths(actual_path) without return types