code: def test_multiple_newlines(self):
      self.check_result("\n\n", "\n")
      self.check_result("\n" * 5, "\n" * 4)
      self.check_result("\n" * 5 + "\t", "\n" * 4)
      self.check_result("\n" * 20, "\n" * 19)
      self.check_result("\n" * 20 + " ", "\n" * 19)
      self.check_result(" \n \n ", " \n")
      self.check_result(" \n\n ", " \n")
      self.check_result(" \n\n", " \n")
      self.check_result("\t\n\n", "\t\n")
      self.check_result("\n\n ", "\n")
      self.check_result("\n\n\t", "\n")
      self.check_result(" \n \n ", " \n")
      self.check_result("\t\n\t\n\t", "\t\n")
  
imports: from idlelib import pyshell
  import unittest
  from test.support import requires
  from tkinter import Tk
label_desc: Use image node_id 8 for calling the PyShellRemoveLastNewlineAndSurroundingWhitespaceTest obj's underlying member method code with example usage: obj.test_multiple_newlines() without return types