code: def _create_extract_features_config(
      checkpoint_path: str,
      model_name: str,
      with_fsdp: bool,
      num_gpu: int = 2,
  ):
      cfg = compose_hydra_configuration(
          [
              "config=feature_extraction/extract_resnet_in1k_8gpu",
              "+config/test/integration_test/models=" + model_name,
              "config.MODEL.FSDP_CONFIG.mixed_precision=False",
              f"config.MODEL.WEIGHTS_INIT.PARAMS_FILE={checkpoint_path}",
              "config.DATA.TRAIN.DATA_SOURCES=[synthetic]",
              "config.DATA.TRAIN.LABEL_SOURCES=[synthetic]",
              "config.DATA.TRAIN.RANDOM_SYNTHETIC_IMAGES=True",
              "config.DATA.TRAIN.RANDOM_SYNTHETIC_LABELS=10",
              "config.DATA.TEST.DATA_SOURCES=[synthetic]",
              "config.DATA.TEST.LABEL_SOURCES=[synthetic]",
              "config.DATA.TEST.RANDOM_SYNTHETIC_IMAGES=True",
              "config.DATA.TEST.RANDOM_SYNTHETIC_LABELS=10",
              "config.DATA.TRAIN.DATA_LIMIT=200",
              "config.DATA.TEST.DATA_LIMIT=200",
              "config.SEED_VALUE=0",
              f"config.DISTRIBUTED.NUM_PROC_PER_NODE={num_gpu}",
              "config.OPTIMIZER.construct_single_param_group_only=True",
              "config.DATA.TRAIN.BATCHSIZE_PER_REPLICA=20",
              "config.DATA.TEST.BATCHSIZE_PER_REPLICA=10",
              "config.MODEL.FEATURE_EVAL_SETTINGS.SHOULD_FLATTEN_FEATS=False",
              "config.EXTRACT_FEATURES.CHUNK_THRESHOLD=50",
              # Options used for the nearest neighbors config
              "config.NEAREST_NEIGHBOR.TOPK=20",
              "config.NEAREST_NEIGHBOR.SIGMA=0.1",
              "config.NEAREST_NEIGHBOR.L2_NORM_FEATS=True",
              "config.NEAREST_NEIGHBOR.USE_CUDA=False",
          ]
      )
      args, config = convert_to_attrdict(cfg)
      if with_fsdp:
          config["MODEL"]["TRUNK"]["NAME"] = "regnet_fsdp"
          config.TRAINER.TASK_NAME = "self_supervision_fsdp_task"
      else:
          config["MODEL"]["TRUNK"]["NAME"] = "regnet_v2"
      config.MODEL.TRUNK.REGNET.stage_checkpoints = [
          [2],
          [4],
          [6, 11],
          [],
      ]
      return config
  
file_path: vissl/tests/test_knn.py
imports: import os
  import unittest
  import torch
  from vissl.utils.checkpoint import CheckpointFormatConverter
  from vissl.utils.extract_features_utils import ExtractedFeaturesLoader
  from vissl.utils.hydra_config import compose_hydra_configuration, convert_to_attrdict
  from vissl.utils.knn_utils import run_knn_at_layer, run_knn_at_layer_low_memory
  from vissl.utils.test_utils import gpu_test, in_temporary_directory, run_integration_test
label_desc: Use image node_id 2 for calling the TestKNNBenchmark obj's underlying member method code with example usage: obj._create_extract_features_config(checkpoint_path, model_name, with_fsdp, num_gpu) and returns: config