Translate IDL to Python