code: def _load_state_dict(
      model: nn.Module, arch: str, progress: bool, adv_prop: bool
  ) -> None:
      if adv_prop:
          arch = arch.split("efficientnet-")[-1] + "-ap"
      model_url = look_up_option(arch, url_map, None)
      if model_url is None:
          print(f"pretrained weights of {arch} is not provided")
      else:
          # load state dict from url
          model_url = url_map[arch]
          pretrain_state_dict = model_zoo.load_url(
              model_url, progress=progress
          )
          model_state_dict = model.state_dict()
  
          pattern = re.compile(r"(.+)\.\d+(\.\d+\..+)")
          for key, value in model_state_dict.items():
              pretrain_key = re.sub(pattern, r"\1\2", key)
              if (
                  pretrain_key in pretrain_state_dict
                  and value.shape
                  == pretrain_state_dict[pretrain_key].shape
              ):
                  model_state_dict[key] = pretrain_state_dict[
                      pretrain_key
                  ]
  
          model.load_state_dict(model_state_dict)
  
imports: from __future__ import annotations
  import math
  import operator
  import re
  from functools import reduce
  from typing import NamedTuple
  import torch
  from torch import nn
  from torch.utils import model_zoo
  from monai.networks.blocks import BaseEncoder
  from monai.networks.layers.factories import Act, Conv, Pad, Pool
  from monai.networks.layers.utils import get_norm_layer
  from monai.utils.module import look_up_option
label_desc: Use image node_id 3 for calling a global function with example usage: _load_state_dict(model, arch, progress, adv_prop) without return types