code: def parse_resource(name):
      
      with closing(pkg_resources.resource_stream(__name__, name)) as fp:
          rbytes = fp.read()
  
      return _load(StringIO(rbytes.decode('utf-8')))
docs: Parse a resource file