code: def freeze_model(model, **kwargs):
      """Set all layers non trainable, excluding BatchNormalization layers"""
      _, layers, _, _ = get_submodules_from_kwargs(kwargs)
      for layer in model.layers:
          if not isinstance(layer, layers.BatchNormalization):
              layer.trainable = False
      return
  
label_desc: Use image node_id 1 for calling a global function with example usage: freeze_model(model) without return types