class_docstr: Compare losses and parameter values after several updates when using
  PyTorch DDP vs. FullyShardedDataParallel.
class_docstr_tok: ["Compare","losses","and","parameter","values","after","several","updates","when","using","PyTorch","DDP","vs.","FullyShardedDataParallel","."]
code: def _dummy_ddp_fn(self, model):
      # `MixtureOfExperts`` implements custom gradient reduction logic, so
      # the reference behavior should follow that logic instead of DDP
      return DummyDDP(model)
  
imports: import contextlib
  import functools
  import itertools
  import sys
  from typing import Any, Callable, Dict, List, Optional
  from unittest import mock
  import torch
  import torch.distributed
  import torch.nn
  from torch.distributed.fsdp import CPUOffload, MixedPrecision
  from torch.distributed.fsdp._flat_param import FlatParamHandle
  from torch.distributed.fsdp.fully_sharded_data_parallel import BackwardPrefetch, FullyShardedDataParallel, ShardingStrategy
  from torch.distributed.fsdp.wrap import ModuleWrapPolicy
  from torch.distributed.utils import _p_assert
  from torch.testing._internal.common_distributed import skip_if_lt_x_gpu
  from torch.testing._internal.common_fsdp import AlwaysWrapNestedWrappedModule, CUDAInitMode, DummyDDP, FSDPInitMode, FSDPTest, MixtureOfExperts, NestedWrappedModule, NestedWrappedModuleWithDelay, subtest_name, TransformerWithSharedParams
  from torch.testing._internal.common_utils import instantiate_parametrized_tests, parametrize, run_tests, TEST_WITH_DEV_DBG_ASAN
label_desc: Use image node_id 9 for calling the TestParityWithDDP obj's underlying member method code with example usage: obj._dummy_ddp_fn(model) and returns: DummyDDP