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
