def find_delims(s, delim='"',match=None):
    esc, dbesc = "\\", "\\\\"
    if match is None:
        match = delim
    j = s.find(delim)
    if j > -1 and s[j:j+len(delim)] == delim:
        p1, p2, k = None, None, j
        while k < j+len(s[j+1:]):
            k = k+1
            if k > 0: p1 = s[k-1:k]
            if k > 1: p2 = s[k-2:k]
            if (s[k:k+len(match)] == match and not (p1 == esc and p2 != dbesc)):
                return True, j, k+len(match)-1
            p1 = s[k:k+1]
    return False, j, len(s)
Perform an emergency shutdown of the resources in a slice at this aggregate
dataset/ETHPy150Open xraypy/xraylarch/lib/utils/strutils.py/find_delims--crossover with--dataset/ETHPy150Open fp7-ofelia/ocf/ofam/src/src/foam/api/gapi2.py/AMAPIv2.pub_Shutdown