def resource_string(self, path):
opener = self.get_opener(path)<EOL>filename = opener.get_filename<EOL>try:<EOL><INDENT>size = os.path.getsize(filename)<EOL>if size > <NUM_LIT:50> * <NUM_LIT> * <NUM_LIT>:<EOL><INDENT>logger.warning(<EOL>'<STR_LIT>',<EOL>filename, size)<EOL><DEDENT><DEDENT>except Exception as exc:<EOL><INDENT>logger.debug('<STR_LIT>', filename, exc)<EOL><DEDENT>with opener(filename, '<STR_LIT:r>') as resource:<EOL><INDENT>content = resource.read()<EOL><DEDENT>return content<EOL>
Args:
    path: str, resource file url or resource file absolute/relative path.

Returns:
    string, file content