Python Function Object Is Not Subscriptable