<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_sqlite_autocommit(cn, autocommit):
 """SQLite autocommit setter for core."""

  if isinstance(autocommit, bool):
    cn.isolation_level = None if autocommit else ""
  else:
    cn.isolation_level = autocommit