Hello everyone i am using mongodb 4.2 and pymongo 3.10

During the process I am facing two types of errors:
1 Transient transaction error
2 NoSuchTransaction errCode:251 errMsg: “Transaction 2254 has been aborted.”
Please, help me with this issue, thanks.