initia python3 code for entity manager