code: def commit_update():
      
      unused = _find_unused_partition()
      new = _switch_partition()
      if new != unused:
          msg = f"Bad switch: switched to {new} when {unused} was unused"
          LOG.error(msg)
          raise RuntimeError(msg)
      else:
          LOG.info(f'commit_update: committed to booting {new}')
docs: Switch the target boot partition.