code: def freeze_bn(model):
      classname = model.__class__.__name__
      if classname.find("BatchNorm") != -1:
          model.eval()
  
imports: import math
  import os
  import torch
  from typing import Union, Any, Optional
  from pathlib import Path
  from collections.abc import Iterable
  from torch import nn
  from torch import optim
  from torch.optim import Optimizer
  from torch.utils.data.dataloader import DataLoader
  from torch.utils.data.dataset import Dataset
  from towhee.data.dataset.dataset import TowheeDataSet, TorchDataSet
  from towhee.trainer.callback import TensorBoardCallBack, ProgressBarCallBack, PrintCallBack, ModelCheckpointCallback, EarlyStoppingCallback, TrainerControl, Callback
  from towhee.trainer.metrics import get_metric_by_name
  from towhee.trainer.modelcard import ModelCard, MODEL_CARD_NAME
  from towhee.trainer.utils.trainer_utils import STATE_CHECKPOINT_NAME, MODEL_NAME, set_seed, reduce_value, is_main_process, send_to_device, unwrap_model, _construct_loss_from_config, _construct_optimizer_from_config, _construct_scheduler_from_config
  from towhee.trainer.training_config import TrainingConfig
  from towhee.utils.log import trainer_log
  from towhee.trainer.optimization.optimization import get_scheduler, get_warmup_steps
  from towhee.trainer.callback import CallbackList, _get_summary_writer_constructor
label_desc: Use image node_id 1 for calling a global function with example usage: freeze_bn(model) without return types