code: def check_all_model_params_in_groups2(
      model: nn.Module, param_groups: List[List[nn.Parameter]]
  ):
      num_params = len(
          [param for group in param_groups for param in group]
      )
      num_params_expected = len(list(model.parameters()))
  
      if num_params != num_params_expected:
          raise RuntimeError(
              f"{num_params_expected} params in model but only {num_params} "
              "in parameter group"
          )
  
file_path: icevision/icevision/utils/torch_utils.py
imports: from icevision.imports import *
label_desc: Use image node_id 7 for calling a global function with example usage: check_all_model_params_in_groups2(model, param_groups) without return types