async def METHOD_NAME(
    name: str,
    query: Optional[QueryType] = None,
    mark_as_discarded: bool = Query(
        default=False,
        title="If True, matched records won't be deleted."
        " Instead of that, the record status will be changed to `Discarded`",
    ),
    request_deps: CommonTaskHandlerDependencies = Depends(),
    service: DatasetsService = Depends(DatasetsService.get_instance),
    storage: RecordsStorageService = Depends(RecordsStorageService.get_instance),
    current_user: User = Security(auth.get_current_user),