<human>:  Regular expression substitution in Python
<bot>: Here is some code to remove all instances of parenthesesis containing text beginning with `as ` from string `line`

line = re.sub('\\(+as .*?\\) ', '', line)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.