code: def set_bn_eval(m: nn.Module, use_eval=True) -> None:
      "Set bn layers in eval mode for all recursive children of `m`."
      for l in m.children():
          if (
              isinstance(l, bn_types)
              and not next(l.parameters()).requires_grad
          ):
              if use_eval:
                  l.eval()
              else:
                  l.train()
          set_bn_eval(l)
  
imports: from __future__ import annotations
  from ..basics import *
  from .progress import *
  from .fp16 import *
label_desc: Use image node_id 1 for calling a global function with example usage: set_bn_eval(m, use_eval) without return types