#NEWLINE# def filename_to_uri( self , filename ) : #NEWLINE# #INDENT# 'Convert the given ``filename`` to a URI relative to\n           this :class:`.TemplateCollection`.' #NEWLINE# try : #NEWLINE# #INDENT# return self . _uri_cache [ filename ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# value = self . _relativeize ( value ) #NEWLINE# self . _uri_cache [ filename ] = value #NEWLINE# return value