code: def test_mlflow_logger_finalize(mlflow_mock, status, expected):
      logger = MLFlowLogger("test")
  
      # Pretend we are in a worker process and finalizing
      _ = logger.experiment
      assert logger._initialized
  
      logger.finalize(status)
      logger.experiment.set_terminated.assert_called_once_with(
          logger.run_id, expected
      )
  
imports: import os
  from unittest import mock
  from unittest.mock import MagicMock, Mock
  import pytest
  from lightning.pytorch import Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.loggers.mlflow import _MLFLOW_AVAILABLE, MLFlowLogger, _get_resolve_tags
label_desc: Use image node_id 12 for calling a global function with example usage: test_mlflow_logger_finalize(mlflow_mock, status, expected) without return types