code: def test_attack_targeted(self) -> None:
      model = BasicModel()
      input = torch.tensor(
          [[9.0, 10.0, -6.0, -1.0]], requires_grad=True
      )
      adv = PGD(model)
      perturbed_input = adv.perturb(
          input, 0.2, 0.1, 3, 3, targeted=True
      )
      assertTensorAlmostEqual(
          self,
          perturbed_input,
          [[9.0, 10.0, -6.0, -1.2]],
          delta=0.01,
          mode="max",
      )
  
file_path: captum/tests/robust/test_PGD.py
imports: import torch
  from captum.robust import PGD
  from tests.helpers.basic import assertTensorAlmostEqual, BaseTest
  from tests.helpers.basic_models import BasicModel, BasicModel2, BasicModel_MultiLayer
  from torch.nn import CrossEntropyLoss
label_desc: Use image node_id 2 for calling the Test obj's underlying member method code with example usage: obj.test_attack_targeted() without return types