code: def logout (self):
          '''Sends exit to the remote shell.
  
          If there are stopped jobs then this automatically sends exit twice.
          '''
          self.sendline("exit")
          index = self.expect([EOF, "(?i)there are stopped jobs"])
          if index==1:
              self.sendline("exit")
              self.expect(EOF)
          self.close(f logout (self):
          '''Sends exit to the remote shell.
  
          If there are stopped jobs then this automatically sends exit twice.
          '''
          self.sendline("exit")
          index = self.expect([EOF, "(?i)there are stopped jobs"])
          if index==1:
              self.sendline("exit")
              self.expect(EOF)
          self.close()
docs: Sends exit to the remote shell.
  
          If there are stopped jobs then this automatically sends exit twice.