code: def split_batchnorm_params(model: nn.Module):
      """Finds the set of BatchNorm parameters in the model.
  
      Recursively traverses all parameters in the given model and returns a tuple
      of lists: the first element is the set of batchnorm parameters, the second
      list contains all other parameters of the model."""
      batchnorm_params = []
      other_params = []
      for module in model.modules():
          # If module has children (i.e. internal node of constructed DAG) then
          # only add direct parameters() to the list of params, else go over
          # children node to find if they are BatchNorm or have "bias".
          if list(module.children()) != []:
              for params in module.parameters(recurse=False):
                  if params.requires_grad:
                      other_params.append(params)
          elif isinstance(module, nn.modules.batchnorm._BatchNorm):
              for params in module.parameters():
                  if params.requires_grad:
                      batchnorm_params.append(params)
          else:
              for params in module.parameters():
                  if params.requires_grad:
                      other_params.append(params)
      return batchnorm_params, other_params
  
imports: import collections.abc
  import contextlib
  import json
  import logging
  import os
  import time
  from functools import partial
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  import torch.nn
  from classy_vision.generic.distributed_util import broadcast_object, is_primary
  from fvcore.common.file_io import PathManager
label_desc: Use image node_id 28 for calling a global function with example usage: split_batchnorm_params(model) and returns: batchnorm_params,  other_params