def _check_pages_api_limit(max_pages):
    """
    Internal function for checking number of pages requested to comply with api quota.

    Parameters
    ----------
    max_pages: int
        max number of pages that returned from the Petfinder API.

    Returns
    -------
    integer
        either the original max_pages if the user got an advanced quota or 10,000 which is the current normal quota for api requests

    """
    if max_pages > 10000:
        ans = input(
            """Total pages requested is {} which exceeds the daily API requests quota by PetFinder,
                        do you want to limit the pages to 10,000 only? y|n """
            .format(max_pages))
        if ans.lower() in ['y', 'yes']:
            max_pages = 10000
        elif ans.lower() not in ['n', 'no']:
            raise ValueError('Only y|n accepted as answers')
    return max_pages
