'Create and return a new Dataset object.'

def create(self, manage_roles=None, access_roles=None, flush=True, **kwargs):

    kwargs.update(dict(state=kwargs.get('state', model.Dataset.states.NEW)))
    dataset = model.Dataset(**kwargs)
    self.session().add(dataset)
    self.permissions.set(dataset, manage_roles, access_roles, flush=False)
    if flush:
        self.session().flush()
    return dataset
