<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_urlhash(self, url, fmt):
 """Returns the hash of the file of an internal url """

        with self.open(os.path.basename(url)) as f:
            return {'url': fmt(url), 'sha256': filehash(f, 'sha256')}