Updated adapter.py with required functions

Code runs