def GetNotebookRoot(panes, notebook_id):
    """
    Returns the :class:`~wx.lib.agw.aui.auibook.AuiNotebook` which has the specified `notebook_id`.

    :param `panes`: a list of :class:`AuiPaneInfo` instances;
    :param integer `notebook_id`: the target notebook id.
    """
    for paneInfo in panes:
        if paneInfo.IsNotebookControl(
            ) and paneInfo.notebook_id == notebook_id:
            return paneInfo
    return None
