code: def _resnet(
      block: type[DecoderBasicBlock | DecoderBottleneck],
      layers: list[int],
      **kwargs: Any,
  ) -> ResNet:
      model = ResNet(block, layers, **kwargs)
      return model
  
imports: from __future__ import annotations
  from typing import Any, Callable
  from torch import Tensor, nn
  from torchvision.models.resnet import conv1x1, conv3x3
label_desc: Use image node_id 1 for calling a global function with example usage: _resnet(block, layers) and returns: model