human
Complete this python program:
def default_selem(func):
assistant
#Here is the Python program you requested.

    """Decorator to add a default structuring element to morphology functions.
    Parameters
    func : function
    A morphology function such as erosion, dilation, opening, closing,
    white_tophat, or black_tophat.
    Returns
    func_out : function
    The function, using a default structuring element of same dimension
    as the input image with connectivity 1.
    """
    @functools.wraps(func)
    def func_out(image, selem=None, *args, **kwargs):
        if (selem is None):
            selem = _default_selem(image.ndim)
        return func(image, selem=selem, *args, **kwargs)
    return func_out