code: def test_rstrip_end(self):
      text = self.text
      for code in ("", "\n", "\n\n\n"):
          with self.subTest(code=code):
              text.insert("1.0", code)
              self.do_rstrip()
              self.assertEqual(text.get("1.0", "end-1c"), "")
      for code in ("a\n", "a\n\n", "a\n\n\n"):
          with self.subTest(code=code):
              text.delete("1.0", "end-1c")
              text.insert("1.0", code)
              self.do_rstrip()
              self.assertEqual(text.get("1.0", "end-1c"), "a\n")
  
imports: from idlelib import format
  import unittest
  from unittest import mock
  from test.support import requires
  from tkinter import Tk, Text
  from idlelib.editor import EditorWindow
  from idlelib.idle_test.mock_idle import Editor
label_desc: Use image node_id 5 for calling the RstripTest obj's underlying member method code with example usage: obj.test_rstrip_end() without return types