python code for amo