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

def isdicom(fn):
    '''True if the fn points to a DICOM image'''
    fn = str(fn)
    if fn.endswith('.dcm'):
        return True
    # Dicom signature from the dicom spec.
    with open(fn,'rb') as fh:
        fh.seek(0x80)
        return fh.read(4)==b'DICM'