docstr: Test that we throw an exception when we are using DDP static graph with compile params
docstr_tok: ["Test","that","we","throw","an","exception","when","we","are","using","DDP","static","graph","with","compile","params"]
code: def _test_prepare_module_ddp_throws_with_compile_params_and_static_graph() -> (
      None
  ):
      """
      Test that we throw an exception when we are using DDP static graph with compile params
      """
  
      tc = unittest.TestCase()
      with tc.assertRaisesRegex(
          RuntimeError,
          "Torch compile requires DDPStrategy's static_graph to be False",
      ):
          prepare_module(
              module=torch.nn.Linear(2, 2),
              device=init_from_env(),
              strategy=DDPStrategy(static_graph=True),
              torch_compile_params=TorchCompileParams(
                  backend="inductor"
              ),
          )
  
imports: import unittest
  from unittest.mock import patch
  import torch
  from torch.distributed.fsdp import FullyShardedDataParallel
  from torch.distributed.fsdp.fully_sharded_data_parallel import MixedPrecision
  from torch.nn.parallel import DistributedDataParallel
  from torchtnt.utils.env import init_from_env
  from torchtnt.utils.prepare_module import _is_fsdp_module, DDPStrategy, FSDPStrategy, NOOPStrategy, prepare_ddp, prepare_fsdp, prepare_module, TorchCompileParams
  from torchtnt.utils.test_utils import spawn_multi_process
  from torchtnt.utils.version import is_torch_version_geq_1_13, is_torch_version_geq_2_0
label_desc: Use image node_id 20 for calling the PrepareModelTest obj's underlying member method code with example usage: obj._test_prepare_module_ddp_throws_with_compile_params_and_static_graph() without return types