code: def create_model(
      model_name, num_classes=1000, pretrained=False, **kwargs
  ):
      if "test_time_pool" in kwargs:
          test_time_pool = kwargs.pop("test_time_pool")
      else:
          test_time_pool = True
      if "extra" in kwargs:
          extra = kwargs.pop("extra")
      else:
          extra = True
      if model_name == "dpn68":
          model = dpn68(
              num_classes=num_classes,
              pretrained=pretrained,
              test_time_pool=test_time_pool,
          )
      elif model_name == "dpn68b":
          model = dpn68b(
              num_classes=num_classes,
              pretrained=pretrained,
              test_time_pool=test_time_pool,
          )
      elif model_name == "dpn92":
          model = dpn92(
              num_classes=num_classes,
              pretrained=pretrained,
              test_time_pool=test_time_pool,
              extra=extra,
          )
      elif model_name == "dpn98":
          model = dpn98(
              num_classes=num_classes,
              pretrained=pretrained,
              test_time_pool=test_time_pool,
          )
      elif model_name == "dpn131":
          model = dpn131(
              num_classes=num_classes,
              pretrained=pretrained,
              test_time_pool=test_time_pool,
          )
      elif model_name == "dpn107":
          model = dpn107(
              num_classes=num_classes,
              pretrained=pretrained,
              test_time_pool=test_time_pool,
          )
      elif model_name == "resnet18":
          model = resnet18(
              num_classes=num_classes, pretrained=pretrained, **kwargs
          )
      elif model_name == "resnet34":
          model = resnet34(
              num_classes=num_classes, pretrained=pretrained, **kwargs
          )
      elif model_name == "resnet50":
          model = resnet50(
              num_classes=num_classes, pretrained=pretrained, **kwargs
          )
      elif model_name == "resnet101":
          model = resnet101(
              num_classes=num_classes, pretrained=pretrained, **kwargs
          )
      elif model_name == "resnet152":
          model = resnet152(
              num_classes=num_classes, pretrained=pretrained, **kwargs
          )
      elif model_name == "densenet121":
          model = densenet121(
              num_classes=num_classes, pretrained=pretrained, **kwargs
          )
      elif model_name == "densenet161":
          model = densenet161(
              num_classes=num_classes, pretrained=pretrained, **kwargs
          )
      elif model_name == "densenet169":
          model = densenet169(
              num_classes=num_classes, pretrained=pretrained, **kwargs
          )
      elif model_name == "densenet201":
          model = densenet201(
              num_classes=num_classes, pretrained=pretrained, **kwargs
          )
      elif model_name == "inception_v3":
          model = inception_v3(
              num_classes=num_classes,
              pretrained=pretrained,
              transform_input=False,
              **kwargs,
          )
      else:
          if not False:
              raise AssertionError(
                  "Unknown model architecture (%s)" % model_name
              )
      return model
  
file_path: pywick/pywick/models/classification/dpn/model_factory.py
imports: import math
  from .dualpath import *
  from torchvision.models.resnet import resnet18, resnet34, resnet50, resnet101, resnet152
  from torchvision.models.densenet import densenet121, densenet169, densenet161, densenet201
  from torchvision.models.inception import inception_v3
  import torchvision.transforms
  from PIL import Image
label_desc: Use image node_id 1 for calling a global function with example usage: create_model(model_name, num_classes, pretrained) and returns: model