code: def test_comet_logger_experiment_name(comet_mock):
      """Test that Comet Logger experiment name works correctly."""
      api_key = "key"
      experiment_name = "My Name"
  
      # Test api_key given
      comet_experiment = comet_mock.Experiment
      logger = CometLogger(
          api_key=api_key, experiment_name=experiment_name
      )
      assert logger._experiment is None
  
      _ = logger.experiment
      comet_experiment.assert_called_once_with(
          api_key=api_key, project_name=None
      )
      comet_experiment().set_name.assert_called_once_with(
          experiment_name
      )
  
imports: import os
  from unittest import mock
  from unittest.mock import DEFAULT, Mock, patch
  import pytest
  from lightning.pytorch import Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.loggers import CometLogger
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from torch import tensor
label_desc: Use image node_id 4 for calling a global function with example usage: test_comet_logger_experiment_name(comet_mock) without return types