<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def trim_floating_solid(im):
 r""" Removes all solid that that is not attached to the edges of the image. Parameters im : ND-array The image of the porous material Returns ------- image : ND-array A version of ``im`` but with all the disconnected solid removed. See Also -------- find_disconnected_voxels """

    im = sp.copy(im)
    holes = find_disconnected_voxels(~im)
    im[holes] = True
    return im