code: def _create_pretraining_config(
      num_gpu: int = 2,
      with_fsdp: bool = False,
      fsdp_flatten_parameters: bool = False,
  ):
      cfg = compose_hydra_configuration(
          [
              "config=test/integration_test/quick_swav",
              "+config/test/integration_test/models=swav_regnet_fsdp",
              "config.DATA.TRAIN.DATA_SOURCES=[synthetic]",
              "config.DATA.TRAIN.RANDOM_SYNTHETIC_IMAGES=True",
              "config.DATA.TRAIN.DATA_LIMIT=40",
              "config.DATA.TRAIN.BATCHSIZE_PER_REPLICA=4",
              "config.SEED_VALUE=0",
              "config.LOSS.swav_loss.epsilon=0.03",
              f"config.DISTRIBUTED.NUM_PROC_PER_NODE={num_gpu}",
              "config.LOG_FREQUENCY=1",
              "config.OPTIMIZER.construct_single_param_group_only=True",
          ]
      )
      args, config = convert_to_attrdict(cfg)
      if with_fsdp:
          config["MODEL"]["TRUNK"]["NAME"] = "regnet_fsdp"
          config["MODEL"]["HEAD"]["PARAMS"][0][0] = "swav_head_fsdp"
          config.TRAINER.TASK_NAME = "self_supervision_fsdp_task"
          config.MODEL.FSDP_CONFIG.flatten_parameters = (
              fsdp_flatten_parameters
          )
          config.MODEL.FSDP_CONFIG.mixed_precision = False
      else:
          config["MODEL"]["TRUNK"]["NAME"] = "regnet_v2"
          config["MODEL"]["HEAD"]["PARAMS"][0][0] = "swav_head"
      return config
  
imports: import os
  import unittest
  from classy_vision.optim import build_optimizer_schedulers
  from vissl.config import AttrDict
  from vissl.models import build_model
  from vissl.optimizers import get_optimizer_param_groups
  from vissl.utils.checkpoint import CheckpointFormatConverter
  from vissl.utils.hydra_config import compose_hydra_configuration, convert_to_attrdict
  from vissl.utils.test_utils import gpu_test, in_temporary_directory, run_integration_test, spawn_distributed_test
label_desc: Use image node_id 1 for calling the TestFineTuning obj's underlying member method code with example usage: obj._create_pretraining_config(num_gpu, with_fsdp, fsdp_flatten_parameters) and returns: config