code: def generate_adv_target(mode, future_target, factor=1.5):
      if mode == "over":
          adv_target = factor * future_target
      elif mode == "under":
          adv_target = factor * future_target
      elif mode == "zero":
          adv_target = torch.zeros_like(future_target)
      else:
          raise Exception("No such mode")
      return adv_target
  
imports: import torch
  import torch.nn
  import torch.optim
  from tqdm.auto import tqdm
  from typing import List
  from sparse_layer import SparseNet
label_desc: Use image node_id 2 for calling a global function with example usage: generate_adv_target(mode, future_target, factor) and returns: adv_target