code: def complexity(model):
      """Compute model complexity (model can be model instance or model class)."""
      size = cfg.TRAIN.IM_SIZE
      cx = {"h": size, "w": size, "flops": 0, "params": 0, "acts": 0}
      cx = unwrap_model(model).complexity(cx)
      return {
          "flops": cx["flops"],
          "params": cx["params"],
          "acts": cx["acts"],
      }
  
file_path: pycls/pycls/core/net.py
imports: import itertools
  import numpy
  import pycls.core.distributed
  import torch
  from pycls.core.config import cfg
label_desc: Use image node_id 3 for calling a global function with example usage: complexity(model) and returns: dict