def parse_resource_from_url(self, url):
<EOL>if url == '<STR_LIT>':<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>elif url == '<STR_LIT>':<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>match = self.resource_pattern.match(url)<EOL>if match:<EOL><INDENT>return match.groupdict().get('<STR_LIT>', None)<EOL><DEDENT>
Returns the appropriate resource name for the given URL.

:param url:  API URL stub, like: '/api/hosts'
:return: Resource name, like 'hosts', or None if not found