def METHOD_NAME(events):
    """translate IOLoop.READ/WRITE/ERROR event masks into zmq.POLLIN/OUT/ERR"""
    z_events = 0
    if events & IOLoop.READ:
        z_events |= POLLIN
    if events & IOLoop.WRITE:
        z_events |= POLLOUT
    if events & IOLoop.ERROR:
        z_events |= POLLERR
    return z_events