code: def test_generate_graphs(
      config_path: Text,
      expected_train_schema_path: Text,
      expected_predict_schema_path: Text,
      training_type: TrainingType,
      is_finetuning: bool,
  ):
      expected_schema_as_dict = rasa.shared.utils.io.read_yaml_file(
          expected_train_schema_path
      )
      expected_train_schema = GraphSchema.from_dict(
          expected_schema_as_dict
      )
  
      expected_schema_as_dict = rasa.shared.utils.io.read_yaml_file(
          expected_predict_schema_path
      )
      expected_predict_schema = GraphSchema.from_dict(
          expected_schema_as_dict
      )
  
      config = rasa.shared.utils.io.read_yaml_file(config_path)
  
      recipe = Recipe.recipe_for_name(DefaultV1Recipe.name)
      model_config = recipe.graph_config_for_recipe(
          config,
          {},
          training_type=training_type,
          is_finetuning=is_finetuning,
      )
  
      train_schema = model_config.train_schema
      for node_name, node in expected_train_schema.nodes.items():
          assert train_schema.nodes[node_name] == node
  
      assert train_schema == expected_train_schema
  
      default_v1_validator = DefaultV1RecipeValidator(train_schema)
      importer = RasaFileImporter()
      # does not raise
      default_v1_validator.validate(importer)
  
      predict_schema = model_config.predict_schema
      for node_name, node in expected_predict_schema.nodes.items():
          assert predict_schema.nodes[node_name] == node
  
      assert predict_schema == expected_predict_schema
  
      rasa.engine.validation.validate(model_config)
  
imports: from typing import Text, Dict, Any, Set, List
  import shutil
  import pytest
  from _pytest.capture import CaptureFixture
  from pathlib import Path
  from rasa.engine.constants import PLACEHOLDER_TRACKER
  from rasa.shared.core.trackers import DialogueStateTracker
  from rasa.shared.nlu.training_data.message import Message
  import rasa.shared.utils.io
  from rasa.shared.constants import ASSISTANT_ID_KEY, CONFIG_AUTOCONFIGURABLE_KEYS
  from rasa.core.policies.ted_policy import TEDPolicy
  from rasa.engine.graph import GraphSchema, GraphComponent, ExecutionContext
  from rasa.engine.recipes.default_recipe import DefaultV1Recipe, DefaultV1RecipeRegisterException
  from rasa.engine.recipes.recipe import Recipe
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.graph_components.validators.default_recipe_validator import DefaultV1RecipeValidator
  from rasa.nlu.classifiers.mitie_intent_classifier import MitieIntentClassifier
  from rasa.nlu.classifiers.sklearn_intent_classifier import SklearnIntentClassifier
  from rasa.nlu.extractors.mitie_entity_extractor import MitieEntityExtractor
  from rasa.shared.exceptions import InvalidConfigException
  from rasa.shared.data import TrainingType
  import rasa.engine.validation
  from rasa.shared.importers.rasa import RasaFileImporter
label_desc: Use image node_id 2 for calling a global function with example usage: test_generate_graphs(config_path, expected_train_schema_path, expected_predict_schema_path, training_type, is_finetuning) without return types