'Return the workflow file as an open stream.'

def stream(self):

    if (self.package is not None):
        return pkg_resources.resource_stream(self.package.__name__, self.resource)
    elif isinstance(self.resource, str):
        if (os.path.isabs(self.resource) and os.path.exists(self.resource)):
            return open(self.resource, 'rb')
    raise ValueError
