def indexing_key_expand_implicit_axes(key, shape):
    """Make implicit axes explicit by adding ``slice(None)``.
    Examples
    --------
    >>> shape = (3, 4, 5)
    >>> indexing_key_expand_implicit_axes(np.s_[2, 1, 1], shape)
    (2, 1, 1)
    >>> indexing_key_expand_implicit_axes(np.s_[0], shape)
    (0, slice(None, None, None), slice(None, None, None))
    >>> indexing_key_expand_implicit_axes(np.s_[0, ...], shape)  # equivalent
    (0, slice(None, None, None), slice(None, None, None))
    >>> indexing_key_expand_implicit_axes(np.s_[:2, None, 0, ...], shape)
    (slice(None, 2, None), None, 0, slice(None, None, None))
    """
    if not isinstance(key, tuple):
        key = key,
    ell_idx = None
    num_none = 0
    nonell_key = []
    for i, idx in enumerate(key):
        if idx is Ellipsis:
            if ell_idx is not None:
                raise IndexError(
                    'Cannot use more than one ellipsis (`...`) for indexing')
            ell_idx = i
        else:
            if idx is None:
                num_none += 1
            nonell_key.append(idx)
    nonell_key = tuple(nonell_key)
    if ell_idx is None:
        ell_idx = len(nonell_key)
    ell_ndim = len(shape) + num_none - len(nonell_key)
    expanded_key = nonell_key[:ell_idx] + (slice(None),
        ) * ell_ndim + nonell_key[ell_idx:]
    return expanded_key
