<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def gather_commands(self, ingredient):
 """Collect all commands from this ingredient and its sub-ingredients. Yields ------ cmd_name: str The full (dotted) name of the command. cmd: function The corresponding captured function. """

        for command_name, command in ingredient.commands.items():
            yield join_paths(ingredient.path, command_name), command