def METHOD_NAME(reason=None):
    """Uses IOKit functions to prevent idle sleep."""
    kIOPMAssertionTypeNoIdleSleep = "NoIdleSleepAssertion"
    kIOPMAssertionLevelOn = 255
    display.display_info('Preventing idle sleep')
    if not reason:
        reason = 'Munki is installing software'
    # pylint: disable=undefined-variable
    errcode, assertID = IOPMAssertionCreateWithName(
        kIOPMAssertionTypeNoIdleSleep,
        kIOPMAssertionLevelOn,
        reason, None)
    # pylint: enable=undefined-variable
    if errcode:
        return None
    return assertID