code: def apply_batch_constraints(self, batch_idx):
      for c_idx, modules in self._batch_c_ptrs.items():
          if (batch_idx + 1) % self.constraints[c_idx].frequency == 0:
              for module in modules:
                  self.constraints[c_idx](module)
  
imports: from fnmatch import fnmatch
  import torch
  from .callbacks import Callback
label_desc: Use image node_id 3 for calling the ConstraintContainer obj's underlying member method code with example usage: obj.apply_batch_constraints(batch_idx) without return types