code: def get_logs(logger_file, lines, html, text, refresh):
      if not os.path.isfile(logger_file):
          raise HTTPException(
              status_code=404,
              detail=f"Log File {logger_file} NOT Found",
          )
  
      refresh = max(refresh, 3) if refresh else 0
      if lines > 0:
          with open(logger_file) as fin:
              response_lines = list(deque(fin, lines))
              if html and not text:
                  response = HTML_TEMPLATE.replace(
                      "LINES_T", str(lines)
                  )
                  response = response.replace(
                      "REFRESH_T",
                      "setInterval(fetch, 1000*" + str(refresh) + ");"
                      if refresh
                      else "",
                  )
                  response_type = "text/html"
              else:
                  response = "".join(response_lines)
                  response_type = "text/plain"
              return Response(
                  content=response, media_type=response_type
              )
      return FileResponse(logger_file, media_type="text/plain")
  
file_path: MONAILabel/monailabel/endpoints/logs.py
imports: import os
  import subprocess
  from collections import deque
  from typing import Optional
  from fastapi import APIRouter, Depends, HTTPException
  from fastapi.responses import FileResponse, Response
  from monailabel.config import RBAC_ADMIN, settings
  from monailabel.endpoints.user.auth import RBAC, User
label_desc: Use image node_id 1 for calling a global function with example usage: get_logs(logger_file, lines, html, text, refresh) and returns: FileResponse, Response