Detect String Between Python Function Declaration