code: def set_freeze_model(
      m: nn.Module,  # Model to freeze/unfreeze
      rg: bool,  # `Requires grad` argument. `True` for freeze
  ):
      for p in m.parameters():
          p.requires_grad_(rg)
  
imports: from __future__ import annotations
  from ..basics import *
  from .all import *
label_desc: Use image node_id 7 for calling a global function with example usage: set_freeze_model(m, rg) without return types