def METHOD_NAME(index_name, index_pattern):
    if len(index_name) == 0:
        return False, "Index name is empty"
    # When the indices are requested directly (with --data-streams or --indices) then we honor the
    # request, even if it includes hidden indices. But when asking for all indices we skip hidden
    # indices as they could be system indices and restoring them to another cluster would break it.
    if index_pattern in ("_all", "*") and index_name.startswith("."):
        return False, f"Index [{index_name}] is hidden"
    return True, None