human
I wrote the below code

    locMarker = Empty().setParseAction((lambda s, loc, t: loc))
    endlocMarker = locMarker.copy()
    endlocMarker.callPreparse = False
    matchExpr = ((locMarker('_original_start') + expr) + endlocMarker('_original_end'))
    if asString:
        extractText = (lambda s, l, t: s[t._original_start:t._original_end])
    else:
        def extractText(s, l, t):
            t[:] = [s[t.pop('_original_start'):t.pop('_original_end')]]
    matchExpr.setParseAction(extractText)
    matchExpr.ignoreExprs = expr.ignoreExprs
    return matchExpr

What's a good function header?
 Here's a good function header?
assistant
#Here's a good function header.

def originalTextFor(expr, asString=True):