The methods below look in a string to find if it has any python methods.
def there_is_a_call( string ): return string.find(\'(\') > -1 def find_and_rem
Here:
find_and_remove_functions( string[ function_end + 1: ], found_functions )
should be
return find_and_remove_functions( string[ function_end + 1: ], found_functions )