code: def test_get_prevword(self):
      text = self.text
      previous = self.auto_expand.getprevword
      equal = self.assertEqual
  
      equal(previous(), "")
  
      text.insert("insert", "t")
      equal(previous(), "t")
  
      text.insert("insert", "his")
      equal(previous(), "this")
  
      text.insert("insert", " ")
      equal(previous(), "")
  
      text.insert("insert", "is")
      equal(previous(), "is")
  
      text.insert("insert", "\nsample\nstring")
      equal(previous(), "string")
  
      text.delete("3.0", "insert")
      equal(previous(), "")
  
      text.delete("1.0", "end")
      equal(previous(), "")
  
file_path: cpython/Lib/idlelib/idle_test/test_autoexpand.py
imports: from idlelib.autoexpand import AutoExpand
  import unittest
  from test.support import requires
  from tkinter import Text, Tk
label_desc: Use image node_id 4 for calling the AutoExpandTest obj's underlying member method code with example usage: obj.test_get_prevword() without return types