human
Complete the below
def add_accept_handler(sock, callback):

    ''''Adds an `.IOLoop` event handler to accept new connections on ``sock``.
    When a connection is accepted, ``callback(connection, address)`` will
    be run (``connection`` is a socket object, and ``address`` is the
    address of the other end of the connection).  Note that this signature
    is different from the ``callback(fd, events)`` signature used for
    `.IOLoop` handlers.
    A callable is returned which, when called, will remove the `.IOLoop`
    event handler and stop processing further incoming connections.
    .. versionchanged:: 5.0
    The ``io_loop`` argument (deprecated since version 4.1) has been removed.
    .. versionchanged:: 5.0
    A callable is returned (``None`` was returned before).'
    '''
assistant
#Here is the Python code you requested.
    io_loop = IOLoop.current()
    removed = [False]
    def accept_handler(fd, events):
        for i in xrange(_DEFAULT_BACKLOG):
            if removed[0]:
                return
            try:
                (connection, address) = sock.accept()
            except socket.error as e:
                if (errno_from_exception(e) in _ERRNO_WOULDBLOCK):
                    return
                if (errno_from_exception(e) == errno.ECONNABORTED):
                    continue
                raise
            set_close_exec(connection.fileno())
            callback(connection, address)
    def remove_handler():
        io_loop.remove_handler(sock)
        removed[0] = True
    io_loop.add_handler(sock, accept_handler, IOLoop.READ)
    return remove_handler