def GetNotebookRoot(panes, notebook_id):
    """
    Returns the L{AuiPaneInfo} which has the specified `notebook_id`.

    :param `panes`: a list of L{AuiPaneInfo} instances;
    :param `notebook_id`: the target notebook id.
    """

    for paneInfo in panes:
        if paneInfo.IsNotebookControl() and paneInfo.notebook_id == notebook_id:
            return paneInfo

    return None