code: def test_shift_tokens_right(self):
      input_ids = torch.tensor(
          [[71, 82, 18, 33, 2, 1, 1], [68, 34, 26, 58, 30, 82, 2]],
          dtype=torch.long,
      )
      shifted = shift_tokens_right(input_ids, 1, 2)
      n_pad_before = input_ids.eq(1).float().sum()
      n_pad_after = shifted.eq(1).float().sum()
      self.assertEqual(shifted.shape, input_ids.shape)
      self.assertEqual(n_pad_after, n_pad_before - 1)
      self.assertTrue(torch.eq(shifted[:, 0], 2).all())
  
imports: import copy
  import tempfile
  import unittest
  import timeout_decorator
  from transformers import MvpConfig, 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, floats_tensor, ids_tensor
label_desc: Use image node_id 7 for calling the MvpHeadTests obj's underlying member method code with example usage: obj.test_shift_tokens_right() without return types