Not able to execute python journal as find_module is deprecated in python 3.12

I have one journal “journal.py” where i want to import
import NXOpen.Xyz
import NXOpen.Pqr

these two namespaces are present in one folder in the form of NXOpen_Xyz.pyd and NXOpen_Pqr.pyd.

While executing the journal it is not executing but upto python 3.11.9 it was working where we have used find_module and load_module.

Is there replacement of find_module and load_module and how to use them instead of find_module and load_module.

Any help is appreciated in advance.
Could any one please take it as priority.

I have changed find_module with find_spec and load_module to exec module. While executing it is executing in the first run but in second run it is not executing. Could you please help me

below is the things i want to import
import math
import NXOpen
import NXOpen.Features

Could you please anyone check the issue