code: def test_extract_patterns_use_only_lookup_tables_or_regex_features(
      lookup_tables: Dict[Text, List[Text]],
      regex_features: Dict[Text, Text],
      use_lookup_tables: bool,
      use_regex_features: bool,
      expected_patterns: Dict[Text, Text],
  ):
      training_data = TrainingData()
      if lookup_tables:
          training_data.lookup_tables = [lookup_tables]
      if regex_features:
          training_data.regex_features = [regex_features]
  
      actual_patterns = pattern_utils.extract_patterns(
          training_data,
          use_lookup_tables=use_lookup_tables,
          use_regexes=use_regex_features,
      )
  
      assert actual_patterns == expected_patterns
  
file_path: rasa/tests/nlu/utils/test_pattern_utils.py
imports: from typing import Dict, List, Text
  import pytest
  import rasa.nlu.utils.pattern_utils
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
label_desc: Use image node_id 4 for calling a global function with example usage: test_extract_patterns_use_only_lookup_tables_or_regex_features(lookup_tables, regex_features, use_lookup_tables, use_regex_features, expected_patterns) without return types