def shortname(inputid):  
parsed_id = urllib.parse.urlparse(inputid)<EOL>if parsed_id.fragment:<EOL><INDENT>return parsed_id.fragment.split(u"<STR_LIT:/>")[-<NUM_LIT:1>]<EOL><DEDENT>return parsed_id.path.split(u"<STR_LIT:/>")[-<NUM_LIT:1>]<EOL>
Returns the last segment of the provided fragment or path.