code: def shell(state, host, commands, chdir=None):
      '''
      Run raw shell code.
  
      + commands: command or list of commands to execute on the remote server
      + chdir: directory to cd into before executing commands
      '''
  
      # Ensure we have a list
      if isinstance(commands, six.string_types):
          commands = [commands]
  
      for command in commands:
          if chdir:
              yield 'cd {0} && ({1})'.format(chdir, command)
          else:
              yield commanf shell(state, host, commands, chdir=None):
      '''
      Run raw shell code.
  
      + commands: command or list of commands to execute on the remote server
      + chdir: directory to cd into before executing commands
      '''
  
      # Ensure we have a list
      if isinstance(commands, six.string_types):
          commands = [commands]
  
      for command in commands:
          if chdir:
              yield 'cd {0} && ({1})'.format(chdir, command)
          else:
              yield command
docs: Run raw shell code.
  
      + commands: command or list of commands to execute on the remote server
      + chdir: directory to cd into before executing commands