code: def _apply_G_adv_loss(scores_fake, loss_func):
      """Compute G adversarial loss function
      and normalize values"""
      adv_loss = 0
      if isinstance(scores_fake, list):
          for score_fake in scores_fake:
              fake_loss = loss_func(score_fake)
              adv_loss += fake_loss
          adv_loss /= len(scores_fake)
      else:
          fake_loss = loss_func(scores_fake)
          adv_loss = fake_loss
      return adv_loss
  
imports: import torch
  from torch import nn
  from torch.nn import functional
label_desc: Use image node_id 1 for calling a global function with example usage: _apply_G_adv_loss(scores_fake, loss_func) and returns: adv_loss