def METHOD_NAME(w, N=None):
    """Create identity matrix."""
    if N is None:
        if len(w.shape) > 2:
            N = w.shape[-3]
        else:
            raise ValueError("Cannot deduce the size of the identity matrix. "
                             "Give an explicit keyword argument N.")
    return eye(np.ones(w.shape[-2:]), N)