def METHOD_NAME(context, data_dict):
    '''
    This runs the 'dataset_purge' action from core ckan's delete.py
    It allows us to do some minor changes and wrap it.
    '''
    model = context['model']
    id = _get_or_bust(data_dict, 'id')
    pkg = model.Package.get(id)
    # is_requested_data_type = _is_requested_data_type(pkg)
    # core_delete.dataset_purge(context, data_dict)
    from sqlalchemy import or_
    context['package'] = pkg
    if pkg is None:
        raise NotFound('Dataset was not found')
    _check_access('package_delete', context, data_dict)
    members = model.Session.query(model.Member) \
        .filter(model.Member.table_id == pkg.id) \
        .filter(model.Member.table_name == 'package')
    if members.count() > 0:
        for m in members.all():
            m.purge()
    for r in model.Session.query(model.PackageRelationship).filter(
        or_(model.PackageRelationship.subject_package_id == pkg.id,
            model.PackageRelationship.object_package_id == pkg.id)).all():
        r.purge()
    pkg = model.Package.get(id)
    # no new_revision() needed since there are no object_revisions created
    # during purge
    pkg.purge()
    try:
        model.repo.commit_and_remove()
    except Exception as ex:
        log.error(ex)
    # if is_requested_data_type:
    #     toolkit.get_action("requestdata_request_delete_by_package_id")(context, {'package_id': id})
    log.info('Dataset was purged, id was ' + data_dict.get('id'))