code: def stop():
      res = AsyncTask.stop("batch_infer")
  
      # Try to clear cuda cache
      if torch.cuda.is_available():
          torch.cuda.empty_cache()
      return res
  
file_path: MONAILabel/monailabel/endpoints/batch_infer.py
imports: import logging
  from typing import Optional
  import torch
  from fastapi import APIRouter, Depends, HTTPException
  from monailabel.config import RBAC_ADMIN, RBAC_USER, settings
  from monailabel.endpoints.user.auth import RBAC, User
  from monailabel.interfaces.datastore import DefaultLabelTag
  from monailabel.interfaces.tasks.batch_infer import BatchInferImageType
  from monailabel.utils.async_tasks.task import AsyncTask
label_desc: Use image node_id 3 for calling a global function with example usage: stop() and returns: res