def METHOD_NAME( text ):
   "Insert extra spaces inside of parentheses and brackets/curly braces."
   lparen = re.compile( r'\((?![\s\)])' )
   text = lparen.sub( r'( ', text )
   rparen = re.compile( r'([^\s\(])(?=\))' )
   text = rparen.sub( r'\1 ', text)
   # brackets
   lbrack = re.compile( r'\[(?![\s\]])' )
   text = lbrack.sub( r'[ ', text )
   rbrack = re.compile( r'([^\s\[])(?=\])' )
   text = rbrack.sub( r'\1 ', text)
   # curly braces
   lcurly = re.compile( r'\{(?![\s\}])' )
   text = lcurly.sub( r'{ ', text )
   rcurly = re.compile( r'([^\s\{])(?=\})' )
   text = rcurly.sub( r'\1 ', text)
   return text