<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def build(self, recipe, plugin=None):
 """ Execute a recipe and creates new folder and files. :param recipe: Name of the recipe :param plugin: Name of the plugin, to which the recipe must belong. """

        if recipe not in self.recipes.keys():
            raise RecipeMissingException("Recipe %s unknown." % recipe)

        recipe_obj = self.recipes[recipe]

        if plugin is not None:
            if recipe_obj.plugin != plugin:
                raise RecipeWrongPluginException("The requested recipe does not belong to the given plugin. Use"
                                                 "the app object, to retrieve the requested recipe: "
                                                 "my_app.recipes.get(%s)" % recipe)

        recipe_obj.build()