#NEWLINE# def _parse_link( data , base_url = None ) : #NEWLINE# #INDENT# url = _get_string ( data , 'href' ) #NEWLINE# url = urlparse . urljoin ( base_url , url ) #NEWLINE# if _get_bool ( data , 'templated' ) : #NEWLINE# #INDENT# fields = [ Field ( name , location = 'path' ) for name in uritemplate . variables ( url ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# fields = None #NEWLINE# #UNINDENT# return Link ( url = url , fields = fields )