code: def test_rstrip_lines(self):
      original = (
          "Line with an ending tab    \n"
          "Line ending in 5 spaces     \n"
          "Linewithnospaces\n"
          "    indented line\n"
          "    indented line with trailing space \n"
          "    \n"
      )
      stripped = (
          "Line with an ending tab\n"
          "Line ending in 5 spaces\n"
          "Linewithnospaces\n"
          "    indented line\n"
          "    indented line with trailing space\n"
      )
  
      self.text.insert("1.0", original)
      self.do_rstrip()
      self.assertEqual(self.text.get("1.0", "insert"), stripped)
  
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 4 for calling the RstripTest obj's underlying member method code with example usage: obj.test_rstrip_lines() without return types