def derive_section_root(page):
    """
    Returns the 'section root' for the provided ``page``, or ``None``
    if no such page can be identified. Results are dependant on the
    value of the ``WAGTAILMENUS_SECTION_ROOT_DEPTH`` setting.
    """
    from wagtailmenus.conf import settings
    desired_depth = settings.SECTION_ROOT_DEPTH
    if page.depth == desired_depth:
        return page.specific
    if page.depth > desired_depth:
        return page.get_ancestors().get(depth=desired_depth).specific
