def init():
    """
    Create an inotify instance and return the associated file descriptor.
    """
    fd = libc.inotify_init()
    if fd < 0:
        raise INotifyError("INotify initialization error.")
    return fd

    Create an inotify instance and return the associated file descriptor.
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/_inotify.py