code: def print_network(net):
      if isinstance(net, list):
          net = net[0]
      num_params = 0
      for param in net.parameters():
          num_params += param.numel()
      print(net)
      print("Total number of parameters: %d" % num_params)
  
imports: import torch
  import torch.nn
  import functools
  from torch.autograd import Variable
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: print_network(net) without return types