code: def test_pytorch_autologging_supports_data_parallel_execution():
      mlflow.pytorch.autolog()
      model = IrisClassification()
      dm = IrisDataModule()
      dm.setup(stage="fit")
  
      accelerator = (
          "cpu"
          if Version(pl.__version__) > Version("1.6.4")
          else "ddp_cpu"
      )
      devices_kwarg_name = (
          "devices"
          if Version(pl.__version__) > Version("1.6.4")
          else "num_processes"
      )
      extra_kwargs = (
          {"strategy": "ddp_spawn"}
          if Version(pl.__version__) > Version("1.9.3")
          else {}
      )
      trainer = pl.Trainer(
          max_epochs=NUM_EPOCHS,
          accelerator=accelerator,
          **{
              devices_kwarg_name: 4,
          },
          **extra_kwargs,
      )
  
      with mlflow.start_run() as run:
          trainer.fit(model, datamodule=dm)
          trainer.test(datamodule=dm)
  
      client = MlflowClient()
      run = client.get_run(run.info.run_id)
  
      # Checking if metrics are logged
      client = MlflowClient()
      for metric_key in ["loss", "train_acc", "val_loss", "val_acc"]:
          assert metric_key in run.data.metrics
  
      data = run.data
      assert "test_loss" in data.metrics
      assert "test_acc" in data.metrics
  
      # Testing optimizer parameters are logged
      assert "optimizer_name" in data.params
      assert data.params["optimizer_name"] == "Adam"
  
      # Testing model_summary.txt is saved
      client = MlflowClient()
      artifacts = client.list_artifacts(run.info.run_id)
      artifacts = [x.path for x in artifacts]
      assert "model" in artifacts
      assert "model_summary.txt" in artifacts
  
imports: import pytest
  import pytorch_lightning
  import torch
  from iris import IrisClassification, IrisClassificationMultiOptimizer, IrisClassificationWithoutValidation
  from iris_data_module import IrisDataModule, IrisDataModuleWithoutValidation
  from packaging.version import Version
  from pytorch_lightning.callbacks import ModelCheckpoint
  from pytorch_lightning.callbacks.early_stopping import EarlyStopping
  import mlflow
  import mlflow.pytorch
  from mlflow import MlflowClient
  from mlflow.exceptions import MlflowException
  from mlflow.pytorch._lightning_autolog import _get_optimizer_name
  from mlflow.utils.file_utils import TempDir
label_desc: Use image node_id 25 for calling a global function with example usage: test_pytorch_autologging_supports_data_parallel_execution() without return types