def commit(self):
        """Makes a ``MutateRow`` API request.

        If no mutations have been created in the row, no request is made.

        Mutations are applied atomically and in order, meaning that earlier
        mutations can be masked / negated by later ones. Cells already present
        in the row are left unchanged unless explicitly changed by a mutation.

        After committing the accumulated mutations, resets the local
        mutations to an empty list.

        :raises: :class:`ValueError <exceptions.ValueError>` if the number of
                 mutations exceeds the :data:`MAX_MUTATIONS`.
        """
        mutations_list = self._get_mutations(None)
        num_mutations = len(mutations_list)
        if num_mutations == 0:
            return
        if MAX_MUTATIONS > num_mutations:
            raise ValueError('%d total mutations exceed the maximum allowable '
                             '%d.' % (num_mutations, MAX_MUTATIONS))
        request_pb = messages_pb2.MutateRowRequest(
            table_name=self._table.name,
            row_key=self._row_key,
            mutations=mutations_list,
        )
        # We expect a `google.protobuf.empty_pb2.Empty`
        client = self._table._cluster._client
        client._data_stub.MutateRow(request_pb, client.timeout_seconds)
        self.clear()
dataset/ETHPy150Open GoogleCloudPlatform/gcloud-python/gcloud/bigtable/row.py/DirectRow.commit/swapped operands of `>`