code: def metattack(data):
      print("Meta-attack...")
      adj, features, labels = (
          to_scipy_sparse_matrix(
              data.edge_index, num_nodes=data.num_nodes
          ),
          data.x.numpy(),
          data.y.numpy(),
      )
      idx = np.arange(data.num_nodes)
      idx_train, idx_val, idx_test = (
          idx[data.train_mask],
          idx[data.val_mask],
          idx[data.test_mask],
      )
      idx_unlabeled = np.union1d(idx_val, idx_test)
      # Setup Surrogate model
      surrogate = GCN(
          nfeat=features.shape[1],
          nclass=labels.max().item() + 1,
          nhid=16,
          dropout=0,
          with_relu=False,
          with_bias=False,
          device=device,
      ).to(device)
      surrogate.fit(
          features, adj, labels, idx_train, idx_val, patience=30
      )
      # Setup Attack Model
      model = Metattack(
          surrogate,
          nnodes=adj.shape[0],
          feature_shape=features.shape,
          attack_structure=True,
          attack_features=False,
          device=device,
          lambda_=0,
      ).to(device)
      # Attack
      n_perturbations = int(data.edge_index.size(1) / 2 * 0.05)
      model.attack(
          features,
          adj,
          labels,
          idx_train,
          idx_unlabeled,
          n_perturbations=n_perturbations,
          ll_constraint=False,
      )
      perturbed_adj = model.modified_adj
      perturbed_data = data.clone()
      perturbed_data.edge_index = torch.LongTensor(
          perturbed_adj.nonzero().T
      )
  
      return perturbed_data
  
file_path: AutoGL/examples/grna_test.py
imports: import os
  import sys
  from autogl.datasets import build_dataset_from_name
  from autogl.datasets.utils.conversion._to_pyg_dataset import to_pyg_dataset
  from autogl.solver import AutoNodeClassifier
  from autogl.module.train import Acc
  from autogl.solver.utils import set_seed
  import argparse
  import torch
  from tqdm import tqdm
  import numpy
  import time
  from torch_geometric.utils import to_scipy_sparse_matrix
  from deeprobust.graph.defense import GCN
  from deeprobust.graph.global_attack import Metattack
label_desc: Use image node_id 1 for calling a global function with example usage: metattack(data) and returns: perturbed_data