code: def test_torch_distributed_trial_experimental_warning() -> None:
      with pytest.warns(optuna.exceptions.ExperimentalWarning):
          if dist.get_rank() == 0:
              study = optuna.create_study()
              TorchDistributedTrial(study.ask())
          else:
              TorchDistributedTrial(None)
  
imports: import datetime
  import os
  from typing import Optional
  import pytest
  import optuna
  from optuna._imports import try_import
  from optuna.integration import TorchDistributedTrial
  from optuna.testing.pruners import DeterministicPruner
  from optuna.testing.storages import StorageSupplier
label_desc: Use image node_id 2 for calling a global function with example usage: test_torch_distributed_trial_experimental_warning() without return types