code: def dpn131(num_classes=1000, pretrained=False, test_time_pool=True):
      """Pretrained DPN131 model"""
      model = DPN(
          num_init_features=128,
          k_r=160,
          groups=40,
          k_sec=(4, 8, 28, 3),
          inc_sec=(16, 32, 32, 128),
          num_classes=num_classes,
          test_time_pool=test_time_pool,
      )
      if pretrained:
          if model_urls["dpn131"]:
              state_dict = model_zoo.load_url(model_urls["dpn131"])
              if state_dict.get("classifier.weight") is not None:
                  state_dict["last_linear.weight"] = state_dict.pop(
                      "classifier.weight"
                  )
              if state_dict.get("classifier.bias") is not None:
                  state_dict["last_linear.bias"] = state_dict.pop(
                      "classifier.bias"
                  )
              model.load_state_dict(state_dict)
          elif has_mxnet and os.path.exists("./pretrained/"):
              convert_from_mxnet(
                  model, checkpoint_prefix="./pretrained/dpn131"
              )
          else:
              if not False:
                  raise AssertionError(
                      "Unable to load a pretrained model"
                  )
      return model
  
imports: import os
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.utils.model_zoo
  from collections import OrderedDict
  from .adaptive_avgmax_pool import adaptive_avgmax_pool2d
  from .convert_from_mxnet import convert_from_mxnet, has_mxnet
label_desc: Use image node_id 5 for calling a global function with example usage: dpn131(num_classes, pretrained, test_time_pool) and returns: model