def ReleasePowerAssertion(io_lib, assertion_id):
  """Releases a power assertion.

  Assertions are released with IOPMAssertionRelease, however if they are not,
  assertions are automatically released when the process exits, dies or
  crashes, i.e. a crashed process will not prevent idle sleep indefinitely.

  Args:
    io_lib: IOKit library from ConfigureIOKit()
    assertion_id: c_uint, assertion identification number from
        CreatePowerAssertion()

  Returns:
    0 if successful, stderr otherwise.
  """
  try:
    return io_lib.IOPMAssertionRelease(assertion_id)
  except __HOLE__:
    return 'IOKit library returned an error.'
dataset/ETHPy150Open google/macops/gmacpyutil/gmacpyutil/gmacpyutil.py/ReleasePowerAssertion