#NEWLINE# def url_dirname( url ) : #NEWLINE# #INDENT# " Return the folder containing the '.json' file\n    " #NEWLINE# p = six . moves . urllib . parse . urlparse ( url ) #NEWLINE# for e in [ private . FILE_EXT_JSON , private . FILE_EXT_YAML ] : #NEWLINE# #INDENT# if p . path . endswith ( url ) : #NEWLINE# #INDENT# return six . moves . urllib . parse . urlunparse ( ( ( p [ : 2 ] + ( os . path . dirname ( p . path ) , ) ) + p [ 3 : ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# return url