code: def __init__(self, agg_fn="sum"):
      agg_fns = {
          "sum": np.sum,
          "mean": np.mean,
          "max": np.max,
          "norm": np.linalg.norm,
      }
      self.agg_fn = agg_fns[agg_fn]
  
imports: import torch
  import numpy
  from abc import ABC, abstractmethod
  from sklearn.linear_model import Ridge, lars_path
  from .text_utils import *
  from .perturbation_tools import RemovalPerturbation
label_desc: Use image node_id 1 to create a new AttentionExplanationAllLayers object  with example: obj = AttentionExplanationAllLayers(agg_fn)