https://codity.ir/python-context-manager-with-contextlib/