def is_element_index(index, shape):
    """Return True if index is a concrete index of nested sequence with
    given shape. Return False if index is an incomplete index or slice
    such that indexing operation would result another nested sequence
    rather than an element value.
    """
    if isinstance(index, slice) or index is None:
        return False
    if isinstance(index, int):
        return len(shape) == 1
    if len(index) == len(shape):
        for ind in index:
            if not isinstance(ind, int):
                return False
        return True
    return False