human
I wrote the below code

    def decorate(request, *args, **kwargs):
        dataset = kwargs.get('dataset')
        if (dataset is not None):
            dataset = Dataset.objects.can_read_or_exception(request, dataset)
        kwargs['dataset'] = dataset
        return view_func(request, *args, **kwargs)
    return wraps(view_func)(decorate)

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

def check_dataset_access_permission(view_func):