code: def add_handles(self, layer):
      input_handle = layer.register_forward_hook(self.get_interim_input)
      self.input_handle = input_handle
  
imports: import warnings
  import numpy
  import pandas
  from packaging import version
  from .._explanation import Explanation
  from ..explainers._explainer import Explainer
  from ..explainers.tf_utils import _get_graph, _get_model_inputs, _get_model_output, _get_session
label_desc: Use image node_id 4 for calling the _PyTorchGradient obj's underlying member method code with example usage: obj.add_handles(layer) without return types