code: def get_active_tasks():
      response = {"learn": False, "predict": False, "analyse": False}
  
      if os.name != "posix":
          return response
  
      for process_type in response:
          processes_dir = Path(tempfile.gettempdir()).joinpath(
              f"mindsdb/processes/{process_type}/"
          )
          if not processes_dir.is_dir():
              continue
          clean_unlinked_process_marks()
          process_marks = [x.name for x in processes_dir.iterdir()]
          if len(process_marks) > 0:
              response[process_type] = True
  
      return response
  
imports: import os
  import tempfile
  from pathlib import Path
  import psutil
  from flask import request
  from flask_restx import Resource
  from flask import current_app
  from mindsdb.api.http.namespaces.configs.util import ns_conf
  from mindsdb.utilities.telemetry import enable_telemetry, disable_telemetry, telemetry_file_exists, inject_telemetry_to_static
  from mindsdb.api.http.gui import update_static
  from mindsdb.utilities.fs import clean_unlinked_process_marks
  from mindsdb.api.http.utils import http_error
label_desc: Use image node_id 1 for calling a global function with example usage: get_active_tasks() and returns: response, response