code: def run_model(
      model: str,
      params: Optional[dict] = None,
      run_sync: Optional[bool] = False,
      enqueue: Optional[bool] = False,
  ):
      request = {"model": model} if model else {}
      res, detail = AsyncTask.run(
          "train",
          request=request,
          params=params,
          force_sync=run_sync,
          enqueue=enqueue,
      )
      if res is None:
          raise HTTPException(status_code=429, detail=detail)
      return res
  
file_path: MONAILabel/monailabel/endpoints/train.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.app import MONAILabelApp
  from monailabel.interfaces.utils.app import app_instance
  from monailabel.utils.async_tasks.task import AsyncTask
label_desc: Use image node_id 3 for calling a global function with example usage: run_model(model, params, run_sync, enqueue) and returns: res