def CreatePowerAssertion(io_lib, assertion_type,
                         assertion_level, assertion_reason):
  assertion_id = ctypes.c_uint32(0)
  assertion_type = StrToCFString(assertion_type)
  assertion_reason = StrToCFString(assertion_reason)
  assertion_error = io_lib.IOPMAssertionCreateWithName(
      assertion_type,
      assertion_level,
      assertion_reason,
      ctypes.byref(assertion_id))
  return assertion_error, assertion_id
Creates a power assertion.
dataset/ETHPy150Open google/macops/gmacpyutil/gmacpyutil/gmacpyutil.py/CreatePowerAssertion