code: def _resnet(arch, block, layers, pretrained, progress, **kwargs):
      model = ResNet(block, layers, **kwargs)
      if pretrained:
          state_dict = load_state_dict_from_url(
              model_urls[arch], progress=progress
          )
          model.load_state_dict(state_dict)
      return model
  
imports: import torch
  import torch.nn
  from torchvision.models._utils import IntermediateLayerGetter
  from torch.hub import load_state_dict_from_url
  from torchvision.models.resnet import BasicBlock
label_desc: Use image node_id 3 for calling a global function with example usage: _resnet(arch, block, layers, pretrained, progress) and returns: model