Remove the outermost parens

    >>> unpack(r'(abc)')
    'abc'
    >>> unpack(r'(?:abc)')
    'abc'
    >>> unpack(r'(?P<xyz>abc)')
    'abc'
    >>> unpack(r'[abc]')
    '[abc]'
345078
def danger_unpack(regex):
    

    if is_packed(regex):
        return re.sub(r'^\((\?(:|P<.*?>))?(?P<content>.*?)\)$', r'\g<content>', regex)
    else:
        return regex
1054992
def unwrap(value):
        
        ret = []

        # build lists of column names, and value
        lbl, cols = [], []
        for cname, cval in value.value.items():
            lbl.append(cname)
            cols.append(cval)

        # zip together column arrays to iterate over rows
        for rval in izip(*cols):
            # zip together column names and row values
            ret.append(OrderedDict(zip(lbl, rval)))

        return ret
185730
def _re_flatten(p):
    '''  '''
    if '(' not in p: return p
    return re.sub(r'(\\*)(\(\?P<[^>]+>|\((?!\?))',
        lambda m: m.group(0) if len(m.group(1)) % 2 else m.group(1) + '(?:', p)
960634
def _unpack_bin(self, packed):
        

        output = struct.unpack('H', packed)
        bits16 = output[0]
        r = (bits16 & 0xF800) >> 11
        g = (bits16 & 0x7E0) >> 5
        b = (bits16 & 0x1F)
        return [int(r << 3), int(g << 2), int(b << 3)]
622600
def CleanString(s):
    
    punc = (' ', '-', '\'', '.', '&amp;', '&', '+', '@')
    pieces = []
    for part in s.split():
        part = part.strip()
        for p in punc:
            part = part.replace(p, '_')
        part = part.strip('_')
        part = part.lower()
        pieces.append(part)
    return '_'.join(pieces)
75639
def unescape(s):
    """"""
    s = bytearray(s)
    i = 0
    while i < len(s):
        if s[i] == ord('%'):
            hex_bytes = bytes(s[i+1:i+3])
            value = int(hex_bytes.decode('ascii'), 16)
            s[i:i+3] = [value]
        i += 1
    return bytes(s)
233542
def unpack_rsp(cls, rsp_pb):
        """"""
        if rsp_pb.retType != RET_OK:
            return RET_ERROR, rsp_pb.retMsg, None

        return RET_OK, "", None
1093729
def cleanup(arg):
    """"""
    arg = numpy.asarray(arg)
    if len(arg.shape) <= 1:
        arg = arg.reshape(arg.size, 1)
    elif len(arg.shape) > 2:
        raise ValueError("shapes must be smaller than 3")
    return arg
1248813
def flatten(d, sep='.'):
    """"""

    def _flatten(e, parent_key='', sep='.'):
        import collections

        prefix = parent_key + sep if parent_key else ''

        if isinstance(e, collections.MutableMapping):
            return tuple((prefix + k2, v2) for k, v in e.items() for k2, v2 in _flatten(v, k, sep))
        elif isinstance(e, collections.MutableSequence):
            return tuple((prefix + k2, v2) for i, v in enumerate(e) for k2, v2 in _flatten(v, str(i), sep))
        else:
            return (parent_key, (e,)),

    return tuple((k, v[0]) for k, v in _flatten(d, '', sep))
1107565
function unzip(u, ui, uj, v, vi, vm) {

	while (ui < uj) {

		v[vi] = u[ui];

		++ui;++vi;

		v[vm] = u[ui];

		++ui;++vm;
	}
}
524401
def unpack(packed, object_hook=decode,
           list_hook=None, use_list=False, encoding='utf-8',
           unicode_errors='strict', object_pairs_hook=None,
           max_buffer_size=0, ext_hook=ExtType):
    

    return Unpacker(packed, object_hook=object_hook,
                    list_hook=list_hook,
                    use_list=use_list, encoding=encoding,
                    unicode_errors=unicode_errors,
                    object_pairs_hook=object_pairs_hook,
                    max_buffer_size=max_buffer_size,
                    ext_hook=ext_hook)
77473
function unpack (bits, offset, length) {
    var mask = 0xffffffff, shift
    mask = mask >>> (32 - bits)
    mask = mask >>> (bits - length)
    shift = bits - offset - length
    shift = shift ? 'value >>> ' + shift : 'value'
    return shift + ' & 0x' + mask.toString(16)
}
1133918
def unpack_close(self):
        
        if self.payload:
            code = struct.unpack('!H', str(self.payload[:2]))[0]
            reason = str(self.payload[2:])
        else:
            code = None
            reason = ''

        return code, reason
69177
function cleanUpAST(ast) {
  return walk(ast, function(node, replace) {
    if (node.type === 'Block') {
      var lastIdx = 0;
      var newNodes = [];
      node.nodes.forEach(function(innerNode, i) {
        if (innerNode.type === 'Block' && !innerNode.yield) {
          if (i > 0) newNodes = newNodes.concat(node.nodes.slice(lastIdx, i));
          lastIdx = i + 1;
          newNodes = newNodes.concat(cleanUpAST(innerNode).nodes);
        }
      });
      node.nodes = newNodes.concat(node.nodes.slice(lastIdx));
    }
  });
}
80209
def unpack(tokens):
    """"""
    logger.log_tag("unpack", tokens)
    if use_computation_graph:
        tokens = evaluate_tokens(tokens)
    if isinstance(tokens, ParseResults) and len(tokens) == 1:
        tokens = tokens[0]
    return tokens
1152841
def unpack(data):
    ''''''
    size, position = decoder._DecodeVarint(data, 0)
    envelope = wire.Envelope() 
    envelope.ParseFromString(data[position:position+size])
    return envelope
707760
def unpack(cls, val):
        '''
        
        '''
        reqdictf, incunitf, incval = val
        reqdict = {TimeUnit[k.upper()]: v for (k, v) in reqdictf.items()}
        incunit = None if incunitf is None else TimeUnit[incunitf.upper()]
        return cls(reqdict, incunit, incval)