def METHOD_NAME(self):
    if 'dataset_preview_check' in self.dataset_dict:
        if self.dataset_dict.get('dataset_preview_check', '1') == '1':
            if 'dataset_preview_value' in self.dataset_dict \
                    and self.dataset_dict.get('dataset_preview_value') == vd._DATASET_PREVIEW_FIRST_RESOURCE:
                self.dataset_dict['dataset_preview'] = vd._DATASET_PREVIEW_FIRST_RESOURCE
            else:
                self.dataset_dict['dataset_preview'] = vd._DATASET_PREVIEW_RESOURCE_ID
        else:
            self.dataset_dict['dataset_preview'] = vd._DATASET_PREVIEW_NO_PREVIEW
    else:
        self.dataset_dict['dataset_preview'] = vd._DATASET_PREVIEW_NO_PREVIEW