code: def test_verify_actions_in_rules_not_in_domain(
      tmp_path: Path, domain_path: Text
  ):
      rules_file_name = tmp_path / "rules.yml"
      rules_file_name.write_text(
          f"""
          version: "{LATEST_TRAINING_DATA_FORMAT_VERSION}"
          rules:
          - rule: rule path 1
            steps:
            - intent: goodbye
            - action: action_test_2
          """
      )
      importer = RasaFileImporter(
          domain_path=domain_path, training_data_paths=[rules_file_name]
      )
      validator = Validator.from_importer(importer)
      with pytest.warns(UserWarning) as warning:
          validity = validator.verify_actions_in_stories_rules()
          assert validity is False
  
      assert (
          "The action 'action_test_2' is used in the 'rule path 1' block, "
          "but it is not listed in the domain file."
          in warning[0].message.args[0]
      )
  
imports: import textwrap
  import warnings
  from typing import Text
  import pytest
  from _pytest.logging import LogCaptureFixture
  from rasa.shared.constants import LATEST_TRAINING_DATA_FORMAT_VERSION
  from rasa.validator import Validator
  from rasa.shared.importers.rasa import RasaFileImporter
  from pathlib import Path
label_desc: Use image node_id 22 for calling a global function with example usage: test_verify_actions_in_rules_not_in_domain(tmp_path, domain_path) without return types