def parse_resource_definition(resource_name, resource_dct):
new_dict = {<EOL>'<STR_LIT>': resource_dct.get('<STR_LIT>', __name__),<EOL>'<STR_LIT>': resource_dct['<STR_LIT>'],<EOL>'<STR_LIT>': resource_name,<EOL>'<STR_LIT>': set(),<EOL>'<STR_LIT>': [],<EOL>}<EOL>foreign_methods = {}<EOL>for method in resource_dct['<STR_LIT>']:<EOL><INDENT>if not new_dict['<STR_LIT>'] and len(method['<STR_LIT>']) == <NUM_LIT:1>:<EOL><INDENT>new_dict['<STR_LIT>'] =method['<STR_LIT>'][<NUM_LIT:0>]['<STR_LIT>']<EOL><DEDENT>for api in method['<STR_LIT>']:<EOL><INDENT>api = MethodAPIDescription(resource_name, method, api)<EOL>if api.resource != resource_name:<EOL><INDENT>functions = foreign_methods.setdefault(api.resource, {})<EOL>if api.name in functions:<EOL><INDENT>old_api = functions.get(api.name).defs<EOL>log_method = logger.warning<EOL>if api.url == old_api.url:<EOL><INDENT>log_method = logger.debug<EOL><DEDENT>log_method(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>",<EOL>api.name,<EOL>resource_name,<EOL>pprint.pformat(api),<EOL>api.url,<EOL>pprint.pformat(old_api),<EOL>old_api.url,<EOL>)<EOL>new_dict['<STR_LIT>'].append(api)<EOL>continue<EOL><DEDENT>functions[api.name] = api.generate_func()<EOL><DEDENT>else:<EOL><INDENT>if api.name in new_dict['<STR_LIT>']:<EOL><INDENT>old_api = new_dict.get(api.name).defs<EOL>log_method = logger.warning<EOL>if api.url == old_api.url:<EOL><INDENT>log_method = logger.debug<EOL><DEDENT>log_method(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>",<EOL>api.name,<EOL>resource_name,<EOL>pprint.pformat(api),<EOL>api.url,<EOL>pprint.pformat(old_api),<EOL>old_api.url,<EOL>)<EOL>new_dict['<STR_LIT>'].append(api)<EOL>continue<EOL><DEDENT>new_dict['<STR_LIT>'].add(api.name)<EOL>new_dict[api.name] = api.generate_func()<EOL><DEDENT><DEDENT><DEDENT>return new_dict, foreign_methods<EOL>
Returns all the info extracted from a resource section of the apipie json

:param resource_name: Name of the resource that is defined by the section
:param resrouce_dict: Dictionary as generated by apipie of the resource
    definition