def METHOD_NAME(page, method):
    """
    When a page is created or edited, this will check to make sure it's live and
    public and then call the correct add/update function based on
    the method provided.
    :arg dict page: A dict representing the page that was just added or updated
    :arg str method: "add" or "update", determines which i14y endpoint is called
    """
    if settings.FEC_CMS_ENVIRONMENT != 'PRODUCTION':
        return
    else:
        # Make sure the page is live and public
        try:
            queried_page = Page.objects.live().public().get(id=page.id)
        except Exception:
            queried_page = None
        # Make sure the page is nested in a section we index
        if queried_page:
            queried_page = check_ancestors(queried_page)
        if queried_page:
            if method == 'add':
                add_document(queried_page)
            elif method == 'update':
                update_document(queried_page)