code: def test_retain_grad_hidden_states_attentions(self):
      # decoder cannot keep gradients
      return
  
imports: import copy
  import math
  import tempfile
  import unittest
  from transformers import is_torch_available
  from transformers.testing_utils import require_sentencepiece, require_tokenizers, require_torch, slow, torch_device
  from transformers.utils import cached_property
  from ...generation.test_generation_utils import GenerationTesterMixin
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_common import ModelTesterMixin, ids_tensor
label_desc: Use image node_id 5 for calling the PegasusXStandaloneDecoderModelTest obj's underlying member method code with example usage: obj.test_retain_grad_hidden_states_attentions() without return types