<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def autocommit(data_access):
 """Make statements autocommit. :param data_access: a DataAccess instance """

  if not data_access.autocommit:
    data_access.commit()
  old_autocommit = data_access.autocommit
  data_access.autocommit = True
  try:
    yield data_access
  finally:
    data_access.autocommit = old_autocommit