def path_component(s):
 res = r_path_component.findall(base_url(s))
 return ((res and res[0]) or s)

def path_component ( s ) : res = r_path_component . findall ( base_url ( s ) ) return ( ( res and res [ 0 ] ) or s )
takes a url URL and returns i/like/cheese .