code: def get_network(network, upsampling_factor):
      # Create model
      if network == "MSG":
          model = MSGNet(upsampling_factor)
      elif network == "MSPF":
          model = MSPF(upsampling_factor)
          model.decoder.apply(weights_init_xavier)
      else:
          raise ValueError(f"No such network ({network})")
  
      num_params = sum([np.prod(p.size()) for p in model.parameters()])
      print("Total number of parameters: {}".format(num_params))
  
      num_params_update = sum(
          [
              np.prod(p.shape)
              for p in model.parameters()
              if p.requires_grad
          ]
      )
      print(
          "Total number of learning parameters: {}".format(
              num_params_update
          )
      )
      return model
  
imports: import numpy
  import torch
  from torch import nn
  from .msg.msg import MSGNet
  from .mspf.mspf import MSPF
label_desc: Use image node_id 2 for calling a global function with example usage: get_network(network, upsampling_factor) and returns: model