code: def transaction(self, collections, action, waitForSync = False, lockTimeout = None, params = None) :
          
          payload = {
                  "collections": collections,
                  "action": action,
                  "waitForSync": waitForSync}
          if lockTimeout is not None:
                  payload["lockTimeout"] = lockTimeout
          if params is not None:
              payload["params"] = params
  
          self.connection.reportStart(action)
  
          r = self.connection.session.post(self.transactionURL, data = json.dumps(payload, default=str))
  
          self.connection.reportItem()
  
          data = r.json()
  
          if (r.status_code == 200 or r.status_code == 201 or r.status_code == 202) and not data.get("error") :
              return data
          else :
              raise TransactionError(data["errorMessage"], action, data)
docs: Execute a server-side transaction