def METHOD_NAME(cls):
    if 'tkinter' in str(Text):
        requires('gui')
        cls.tk = Tk()
        cls.text = Text(cls.tk)
    else:
        cls.text = Text()
    cls.auto_expand = AutoExpand(Dummy_Editwin(cls.text))