<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def strip_text_after_string(txt, junk):
 """ used to strip any poorly documented comments at the end of function defs """

    if junk in txt:
        return txt[:txt.find(junk)]
    else:
        return txt