def METHOD_NAME(self, entity='image'):
    maxdim = -1
    maxshape = ()
    for layer in self._layer:
        if entity == 'image':
            shape = layer[entity].get_shape()
        elif entity == 'alpha':
            item = layer.alpha
            # If alpha is an image, get the array
            if isinstance(item, BaseImage.BaseImage):
                item = layer.alpha.get_data()
            shape = np.shape(item)
        else:
            raise BaseImage.ImageError("entity '%s' not in (image, alpha)" % (
                entity))
        if len(shape) > maxdim:
            maxdim = len(shape)
            maxshape = shape
    return maxshape