Resolved unused variable warning in SWIG Python
Updated deprecated syntax in ad.py