code: def set_bn_momentum_default(bn_momentum):
      """
      This function return a function which will assign `bn_momentum` to every module instance within `BATCH_NORM_MODULES`.
      """
  
      def fn(m):
          if isinstance(m, BATCH_NORM_MODULES):
              m.momentum = bn_momentum
  
      return fn
  
file_path: torch-points3d/torch_points3d/core/schedulers/bn_schedulers.py
imports: from typing import *
  from omegaconf import OmegaConf
  from torch import nn
  import logging
label_desc: Use image node_id 1 for calling a global function with example usage: set_bn_momentum_default(bn_momentum) and returns: fn