code: def test_generate_graphs(
      config_path: Text,
      expected_train_schema_path: Text,
      expected_predict_schema_path: Text,
      training_type: TrainingType,
  ):
      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(GraphV1Recipe.name)
      model_config = recipe.graph_config_for_recipe(
          config, {}, training_type=training_type
      )
  
      assert model_config.train_schema == expected_train_schema
      assert model_config.predict_schema == expected_predict_schema
  
      if training_type == TrainingType.NLU:
          core_target = None
      else:
          core_target = config.get("core_target", "select_prediction")
  
      assert model_config.core_target == core_target
      assert model_config.nlu_target == config.get(
          "nlu_target", "run_RegexMessageHandler"
      )
  
      rasa.engine.validation.validate(model_config)
  
file_path: rasa/tests/engine/recipes/test_graph_recipe.py
imports: from typing import Text
  import pytest
  from pathlib import Path
  import rasa.shared.utils.io
  from rasa.engine.exceptions import GraphSchemaException
  from rasa.engine.graph import GraphSchema
  from rasa.engine.recipes.graph_recipe import GraphV1Recipe
  from rasa.engine.recipes.recipe import Recipe
  from rasa.shared.constants import ASSISTANT_ID_KEY
  from rasa.shared.data import TrainingType
  import rasa.engine.validation
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) without return types