def _allowed_pkg_manager_stderr(stderr, allowed_errors):
    """Returns False if the error message isn't in the
    allowed_errors list.
    This function factors out large, and possibly expanding,
    condition so it doesn't cause too much confusion.
    """

    if stderr in allowed_errors:
        return True
    return False