code: def _update_retryable(
              self, criteria, document, upsert=False,
              check_keys=True, multi=False, manipulate=False,
              write_concern=None, op_id=None, ordered=True,
              bypass_doc_val=False, collation=None, array_filters=None,
              session=None):
          
          def _update(session, sock_info, retryable_write):
              return self._update(
                  sock_info, criteria, document, upsert=upsert,
                  check_keys=check_keys, multi=multi, manipulate=manipulate,
                  write_concern=write_concern, op_id=op_id, ordered=ordered,
                  bypass_doc_val=bypass_doc_val, collation=collation,
                  array_filters=array_filters, session=session,
                  retryable_write=retryable_write)
  
          return self.__database.client._retryable_write(
              (write_concern or self.write_concern).acknowledged and not multi,
              _update, session)
docs: Internal update / replace helper.