class_docstr: Base class for `Recipe`s which convert configs to graph schemas.
docstr: Returns `Recipe` based on an optional recipe identifier.
  
  Args:
      name: The identifier which is used to select a certain `Recipe`. If `None`
          the default recipe will be used.
  
  Returns:
      A recipe which can be used to convert a given config to train and predict
      graph schemas.
docstr_tok: ["Returns","`","Recipe","`","based","on","an","optional","recipe","identifier",".","Args",":","name",":","The","identifier","which","is","used","to","select","a","certain","`","Recipe","`",".","If","`","None","`","the","default","recipe","will","be","used",".","Returns",":","A","recipe","which","can","be","used","to","convert","a","given","config","to","train","and","predict","graph","schemas","."]
code: def recipe_for_name(name: Optional[Text]) -> Recipe:
      """Returns `Recipe` based on an optional recipe identifier.
  
      Args:
          name: The identifier which is used to select a certain `Recipe`. If `None`
              the default recipe will be used.
  
      Returns:
          A recipe which can be used to convert a given config to train and predict
          graph schemas.
      """
      from rasa.engine.recipes.default_recipe import DefaultV1Recipe
      from rasa.engine.recipes.graph_recipe import GraphV1Recipe
  
      if name is None:
          rasa.shared.utils.io.raise_deprecation_warning(
              "From Rasa Open Source 4.0.0 onwards it will be required to specify "
              "a recipe in your model configuration. Defaulting to recipe "
              f"'{DefaultV1Recipe.name}'."
          )
          return DefaultV1Recipe()
      recipes = {
          DefaultV1Recipe.name: DefaultV1Recipe,
          GraphV1Recipe.name: GraphV1Recipe,
      }
  
      recipe_constructor = recipes.get(name)
      if recipe_constructor:
          return recipe_constructor()
  
      raise InvalidRecipeException(
          f"No recipe with name '{name}' was found. "
          f"Available recipes are: "
          f"'{DefaultV1Recipe.name}'."
      )
  
file_path: rasa/rasa/engine/recipes/recipe.py
imports: from __future__ import annotations
  import abc
  from typing import Text, Dict, Any, Optional, Tuple, Set
  import rasa.shared.utils.io
  from rasa.engine.graph import GraphModelConfiguration
  from rasa.shared.exceptions import RasaException
  from rasa.shared.data import TrainingType
label_desc: Use image node_id 1 for calling the Recipe obj's underlying member method code with example usage: obj.recipe_for_name(name) and returns: DefaultV1Recipe, recipe_constructor