def _MaybeCommit(self, force_commit=False):
    """Periodically commit changes into the SQLite database.

    Committing every operation is quite expensive, and slows down the
    operation of the script. Thus, we only commit after every N operations,
    as determined by the self.commit_periodicity value. Optionally, the
    caller can force a commit.

    Args:
      force_commit: Pass True in order for a commit to occur regardless
        of the current operation count.
    """
    self.operation_count += 1
    if force_commit or (self.commit_periodicity % self.operation_count) == 0:
      self.secondary_conn.commit()
dataset/ETHPy150Open IanLewis/kay/kay/management/gae_bulkloader.py/_Database._MaybeCommit/swapped operands of `%`