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

def verify_file(fp, password):
        'Returns whether a scrypt encrypted file is valid.'

        sf = ScryptFile(fp = fp, password = password)
        for line in sf: pass
        sf.close()
        return sf.valid