code: async def close(self):
          
          if not self._parent._is_active:
              return
          if self._parent is self:
              await self.rollback()
          else:
              self._is_active = False
docs: Close this transaction.
  
          If this transaction is the base transaction in a begin/commit
          nesting, the transaction will rollback().  Otherwise, the
          method returns.
  
          This is used to cancel a Transaction without affecting the scope of
          an enclosing transaction.