<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def danger_unpack(regex):
 """ Remove the outermost parens 'abc' 'abc' 'abc' '[abc]' """


    if is_packed(regex):
        return re.sub(r'^\((\?(:|P<.*?>))?(?P<content>.*?)\)$', r'\g<content>', regex)
    else:
        return regex