code: def trainable_parameters(
      module: nn.Module,
  ) -> Iterable[Tuple[str, nn.Parameter]]:
      """
      Recursively iterates over all parameters, returning those that
      are trainable (ie they want a grad).
      """
      yield from (
          (p_name, p)
          for (p_name, p) in module.named_parameters()
          if p.requires_grad
      )
  
file_path: opacus/opacus/utils/module_utils.py
imports: import io
  import logging
  import sys
  from typing import Dict, Iterable, List, Tuple
  import torch
  import torch.nn
label_desc: Use image node_id 4 for calling a global function with example usage: trainable_parameters(module) without return types