code: def get_configuration(opts) -> Dict:
      depth = getattr(opts, "model.classification.resnet.depth")
  
      # Whether to build an SE-ResNet model (https://arxiv.org/abs/1709.01507)
      se_resnet = getattr(opts, "model.classification.resnet.se_resnet")
  
      resnet_config = dict()
  
      if depth == 18:
          resnet_config["layer2"] = {
              "num_blocks": 2,
              "mid_channels": 64,
              "block_type": "basic",
              "stride": 1,
          }
          resnet_config["layer3"] = {
              "num_blocks": 2,
              "mid_channels": 128,
              "block_type": "basic",
              "stride": 2,
          }
          resnet_config["layer4"] = {
              "num_blocks": 2,
              "mid_channels": 256,
              "block_type": "basic",
              "stride": 2,
          }
          resnet_config["layer5"] = {
              "num_blocks": 2,
              "mid_channels": 512,
              "block_type": "basic",
              "stride": 2,
          }
          se_resnet_channels = [8, 8, 16, 32]
      elif depth == 34:
          resnet_config["layer2"] = {
              "num_blocks": 3,
              "mid_channels": 64,
              "block_type": "basic",
              "stride": 1,
          }
          resnet_config["layer3"] = {
              "num_blocks": 4,
              "mid_channels": 128,
              "block_type": "basic",
              "stride": 2,
          }
          resnet_config["layer4"] = {
              "num_blocks": 6,
              "mid_channels": 256,
              "block_type": "basic",
              "stride": 2,
          }
          resnet_config["layer5"] = {
              "num_blocks": 3,
              "mid_channels": 512,
              "block_type": "basic",
              "stride": 2,
          }
          se_resnet_channels = [8, 8, 16, 32]
      elif depth == 50:
          resnet_config["layer2"] = {
              "num_blocks": 3,
              "mid_channels": 64,
              "block_type": "bottleneck",
              "stride": 1,
          }
          resnet_config["layer3"] = {
              "num_blocks": 4,
              "mid_channels": 128,
              "block_type": "bottleneck",
              "stride": 2,
          }
          resnet_config["layer4"] = {
              "num_blocks": 6,
              "mid_channels": 256,
              "block_type": "bottleneck",
              "stride": 2,
          }
          resnet_config["layer5"] = {
              "num_blocks": 3,
              "mid_channels": 512,
              "block_type": "bottleneck",
              "stride": 2,
          }
          se_resnet_channels = [16, 32, 64, 128]
      elif depth == 101:
          resnet_config["layer2"] = {
              "num_blocks": 3,
              "mid_channels": 64,
              "block_type": "bottleneck",
              "stride": 1,
          }
          resnet_config["layer3"] = {
              "num_blocks": 4,
              "mid_channels": 128,
              "block_type": "bottleneck",
              "stride": 2,
          }
          resnet_config["layer4"] = {
              "num_blocks": 23,
              "mid_channels": 256,
              "block_type": "bottleneck",
              "stride": 2,
          }
          resnet_config["layer5"] = {
              "num_blocks": 3,
              "mid_channels": 512,
              "block_type": "bottleneck",
              "stride": 2,
          }
          se_resnet_channels = [16, 32, 64, 128]
      else:
          logger.error(
              "ResNet (or SE-ResNet) models are supported with depths of 18, 34, 50 and 101. Please specify depth using "
              "--model.classification.resnet.depth flag. Got: {}".format(
                  depth
              )
          )
  
      if se_resnet:
          add_squeeze_channels(resnet_config, se_resnet_channels)
  
      return resnet_config
  
imports: from typing import Dict, List
  from utils import logger
label_desc: Use image node_id 2 for calling a global function with example usage: get_configuration(opts) and returns: resnet_config