code: def fgm(x, preds, *args, **kwargs):
      if preds.op.type == "Softmax":
          (logits,) = preds.op.inputs
      else:
          raise TypeError("Unclear how to get logits")
      warnings.warn(
          "This function is deprecated. Switch to passing *logits* to"
          " cleverhans.attacks.fgm"
      )
      from cleverhans.attacks import fgm as logits_fgm
  
      return logits_fgm(x, logits, *args, **kwargs)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import warnings
  import numpy
  from cleverhans.attacks.carlini_wagner_l2 import CWL2
  from cleverhans.attacks.deep_fool import deepfool_batch, deepfool_attack
  from cleverhans.attacks.elastic_net_method import EAD
  from cleverhans.attacks.lbfgs import LBFGS_impl
  from cleverhans.attacks.saliency_map_method import jsma_symbolic
  from cleverhans.attacks.spsa import TensorOptimizer, TensorGradientDescent, TensorAdam
  from cleverhans.attacks.spsa import SPSAAdam, margin_logit_loss, _apply_black_border
  from cleverhans.attacks.spsa import _apply_transformation, spm, parallel_apply_transformations
  from cleverhans.attacks.virtual_adversarial_method import vatm
  from cleverhans.utils_tf import jacobian_graph, jacobian_augmentation
  from cleverhans import utils
label_desc: Use image node_id 2 for calling a global function with example usage: fgm(x, preds) and returns: logits_fgm