code: def get_trainable_params(model: nn.Module):
      """
      ### Get trainable parameters
  
      :param model: is the model to train
      :return: a list of parameters for training
      """
  
      # Get all parameters
      params = list(model.parameters())
      # Filter parameters that require gradients
      trainable_params = [p for p in params if p.requires_grad]
  
      #
      return trainable_params
  
imports: from typing import Optional, Set, List
  import torch.nn
  import torch.optim
  import torch.utils.data
  from torch.cuda import amp
  from torch.cuda.amp import GradScaler
  from labml import monit, tracker
  from labml.configs import BaseConfigs, option
  from labml_nn.neox.utils.finetune import FineTuner
label_desc: Use image node_id 1 for calling a global function with example usage: get_trainable_params(model) and returns: trainable_params