<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __handle_variable(self, shell_entry, output):
 """ Saving output for configured variable name. Args: shell_entry(dict):
 shell based configuration (shell, docker container or Python). output: list of strings representing output of last shell """

        if 'variable' in shell_entry:
            variable_name = shell_entry['variable']
            self.pipeline.variables[variable_name] = "\n".join(output)