def METHOD_NAME(self, client, workspace, created_entities):
    visibility = OrgCustom(write=True)
    dataset = client.set_dataset(workspace=workspace.name, visibility=visibility)
    created_entities.append(dataset)
    if visibility._to_public_within_org():
        assert (
            dataset._msg.dataset_visibility
            == _DatasetService.DatasetVisibilityEnum.ORG_SCOPED_PUBLIC
        )
    else:
        assert (
            dataset._msg.dataset_visibility
            == _DatasetService.DatasetVisibilityEnum.PRIVATE
        )