code: def test_consolidation(embedding_size: int, flatten_parameters: bool):
      world_size = 2
      with in_temporary_directory():
          with temp_files_ctx(num=1) as temp_files:
              mp.spawn(
                  _worker,
                  (
                      temp_files[0],
                      world_size,
                      embedding_size,
                      flatten_parameters,
                  ),
                  nprocs=world_size,
              )
  
imports: import functools
  import os
  import tempfile
  from parameterized import parameterized
  import pytest
  import torch
  import torch.distributed
  import torch.multiprocessing
  import torch.nn
  from torch.optim import Adam
  from fairscale.fair_dev.testing.testing import in_temporary_directory, skip_if_single_gpu, temp_files_ctx
  from fairscale.nn import FullyShardedDataParallel
  from tests.nn.data_parallel.test_fsdp import DistributedTest, MixtureOfExperts, rename_test, spawn_and_init
label_desc: Use image node_id 4 for calling a global function with example usage: test_consolidation(embedding_size, flatten_parameters) without return types