code: def get_fake_criterion(loss_type: str) -> tp.Callable:
      assert loss_type in ADVERSARIAL_LOSSES
      if loss_type == "mse":
          return mse_fake_loss
      elif loss_type in ["hinge", "hinge2"]:
          return hinge_fake_loss
      raise ValueError("Unsupported loss")
  
imports: import typing
  import flashy
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 2 for calling a global function with example usage: get_fake_criterion(loss_type) and returns: mse_fake_loss, hinge_fake_loss