code: def set_trainable(model, recompile=True, **kwargs):
      """Set all layers of model trainable and recompile it
  
      Note:
          Model is recompiled using same optimizer, loss and metrics::
  
              model.compile(
                  model.optimizer,
                  loss=model.loss,
                  metrics=model.metrics,
                  loss_weights=model.loss_weights,
                  sample_weight_mode=model.sample_weight_mode,
                  weighted_metrics=model.weighted_metrics,
              )
  
      Args:
          model (``keras.models.Model``): instance of keras model
  
      """
      for layer in model.layers:
          layer.trainable = True
  
      if recompile:
          model.compile(
              model.optimizer,
              loss=model.loss,
              metrics=model.metrics,
              loss_weights=model.loss_weights,
              sample_weight_mode=model.sample_weight_mode,
              weighted_metrics=model.weighted_metrics,
          )
  
label_desc: Use image node_id 1 for calling a global function with example usage: set_trainable(model, recompile) without return types