code: def test_comet_version_without_experiment(comet_mock):
      """Test that CometLogger.version does not create an Experiment."""
      api_key = "key"
      experiment_name = "My Name"
      comet_mock.generate_guid = Mock()
      comet_mock.generate_guid.return_value = "1234"
  
      logger = CometLogger(
          api_key=api_key, experiment_name=experiment_name
      )
      assert logger._experiment is None
  
      first_version = logger.version
      assert first_version is not None
      assert logger.version == first_version
      assert logger._experiment is None
  
      _ = logger.experiment
  
      logger.reset_experiment()
  
      second_version = logger.version == "1234"
      assert second_version is not None
      assert second_version != first_version
  
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 9 for calling a global function with example usage: test_comet_version_without_experiment(comet_mock) without return types