code: def get_model_flops_params(model, input_size=(1, 3, 224, 224)):
      input = torch.randn(input_size)
      macs, params = profile(
          deepcopy(model), inputs=(input,), verbose=False
      )
      macs, params = clever_format([macs, params], "%.3f")
      return macs, params
  
file_path: nni/examples/nas/legacy/cream/lib/utils/util.py
imports: import sys
  import logging
  import torch
  import argparse
  import torch.nn
  from torch import optim
  from thop import profile, clever_format
  from timm.utils import *
  from lib.config import cfg
label_desc: Use image node_id 7 for calling a global function with example usage: get_model_flops_params(model, input_size) and returns: macs,  params