<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def shell(jaide, commands):
 """ Send shell commands to a device. @param jaide: The jaide connection to the device. @type jaide: jaide.Jaide object @param commands: The shell commands to send to the device. @type commands: str or list. @returns: The output of the commands. @rtype str """

    out = ""
    for cmd in clean_lines(commands):
        out += color('> %s\n' % cmd, 'yel')
        out += jaide.shell_cmd(cmd) + '\n'
    return out