<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def closing(image, radius=None, mask=None, footprint = None):
    '''Do a morphological closing
    
    image - pixel image to operate on
    radius - use a structuring element with the given radius. If no structuring
             element, use an 8-connected structuring element.
    mask - if present, only use unmasked pixels for operations
    '''
    dilated_image = grey_dilation(image, radius, mask, footprint)
    return grey_erosion(dilated_image, radius, mask, footprint)