code: async def prepare(self):
          
  
          if not self._parent.is_active:
              raise exc.InvalidRequestError("This transaction is inactive")
          await self._connection._prepare_twophase_impl(self._xid)
          self._is_prepared = True
docs: Prepare this TwoPhaseTransaction.
  
          After a PREPARE, the transaction can be committed.