code: def test_task_init(self):
      handle, path = tempfile.mkstemp()
      with open(handle, "w") as new_config:
          if get_active_config_file():
              with open(get_active_config_file()) as old_config:
                  new_config.write(old_config.read())
          new_config.write(
              "\nsdk.development.vcs_repo_detect_async: false\nsdk.development.report_use_subprocess: false\n"
          )
      environ["CLEARML_CONFIG_FILE"] = path
      try:
          Task.force_store_standalone_script(True)
          Task.set_offline(offline_mode=True)
          ClearMLStatsHandler(
              project_name="MONAI",
              task_name="monai_experiment",
              output_uri=True,
              tags=None,
              reuse_last_task_id=True,
              continue_last_task=False,
              auto_connect_frameworks=True,
              auto_connect_arg_parser=False,
          )
      except Exception as exc:
          self.fail(exc)
      self.assertEqual(Task.current_task().name, "monai_experiment")
      self.assertEqual(Task.current_task()._project_name[1], "MONAI")
      # Close ClearML Task
      Task.current_task().close()
  
file_path: MONAI/tests/test_handler_clearml_stats.py
imports: from __future__ import annotations
  import tempfile
  import unittest
  from os import environ
  from monai.handlers import ClearMLStatsHandler
  from monai.utils import optional_import
label_desc: Use image node_id 1 for calling the TestHandlerClearMLStatsHandler obj's underlying member method code with example usage: obj.test_task_init() without return types