def METHOD_NAME(kids, fds, comb, inos):
    for e in (0, 1):  # 0 == R, 1 == W, see get_pipe_rw()
        res = check_pipe_end(kids, fds[e], comb[e], e, inos)
        if res is not None:
            return res + 'end(%d)' % e
    return None