def _trim_enclosing(s, quotes=True, sequence_markers=True):
    s = s.strip()
    if quotes and s[:3] == s[-3:] and s[:3] in ('"""', "'''"):
        s = s[3:-3]
    elif quotes and s[:1] == s[-1:] and s[:1] in ('"', "'"):
        s = s[1:-1]
    elif sequence_markers and s[:1] == '(' and s[-1:] == ')':
        s = s[1:-1]
    elif sequence_markers and s[:1] == '[' and s[-1:] == ']':
        s = s[1:-1]
    return s
dataset/ETHPy150Open KristoforMaynard/SublimeAutoDocstring/dparse.py/_trim_enclosing/original