'Return absolute filename for the scheme if possible else
raise an ValueError.'

def abspath(self):

    if (self.package is not None):
        return pkg_resources.resource_filename(self.package.__name__, self.resource)
    elif isinstance(self.resource, str):
        if os.path.isabs(self.resource):
            return self.resource
    raise ValueError('cannot    resolve    resource    to    an    absolute    name')
