code: def test_pretrain(
      self, input_param, efficient_input_param, weight_list
  ):
      device = "cuda" if torch.cuda.is_available() else "cpu"
  
      with skip_if_downloading_fails():
          net = FlexibleUNet(**input_param).to(device)
  
      with skip_if_downloading_fails():
          eff_net = EfficientNetBNFeatures(**efficient_input_param).to(
              device
          )
  
      for weight_name in weight_list:
          if (
              weight_name in net.encoder.state_dict()
              and weight_name in eff_net.state_dict()
          ):
              net_weight = net.encoder.state_dict()[weight_name]
              download_weight = eff_net.state_dict()[weight_name]
              weight_diff = torch.abs(net_weight - download_weight)
              diff_sum = torch.sum(weight_diff)
              # check if a weight in weight_list equals to the downloaded weight.
              self.assertLess(abs(diff_sum.item() - 0), 1e-8)
  
imports: from __future__ import annotations
  import unittest
  import torch
  from parameterized import parameterized
  from monai.networks import eval_mode
  from monai.networks.blocks.encoder import BaseEncoder
  from monai.networks.nets import FLEXUNET_BACKBONE, EfficientNetBNFeatures, FlexibleUNet, FlexUNetEncoderRegister, ResNet, ResNetBlock, ResNetBottleneck
  from monai.utils import optional_import
  from tests.utils import skip_if_downloading_fails, skip_if_quick
label_desc: Use image node_id 2 for calling the TestFLEXIBLEUNET obj's underlying member method code with example usage: obj.test_pretrain(input_param, efficient_input_param, weight_list) without return types