code: def test_small_model_pt(self):
      unmasker = pipeline(
          task="fill-mask",
          model="sshleifer/tiny-distilroberta-base",
          top_k=2,
          framework="pt",
      )
  
      outputs = unmasker("My name is <mask>")
      self.assertEqual(
          nested_simplify(outputs, decimals=6),
          [
              {
                  "sequence": "My name is Maul",
                  "score": 2.2e-05,
                  "token": 35676,
                  "token_str": " Maul",
              },
              {
                  "sequence": "My name isELS",
                  "score": 2.2e-05,
                  "token": 16416,
                  "token_str": "ELS",
              },
          ],
      )
  
      outputs = unmasker("The largest city in France is <mask>")
      self.assertEqual(
          nested_simplify(outputs, decimals=6),
          [
              {
                  "sequence": "The largest city in France is Maul",
                  "score": 2.2e-05,
                  "token": 35676,
                  "token_str": " Maul",
              },
              {
                  "sequence": "The largest city in France isELS",
                  "score": 2.2e-05,
                  "token": 16416,
                  "token_str": "ELS",
              },
          ],
      )
  
      outputs = unmasker(
          "My name is <mask>",
          targets=[" Patrick", " Clara", " Teven"],
          top_k=3,
      )
      self.assertEqual(
          nested_simplify(outputs, decimals=6),
          [
              {
                  "sequence": "My name is Patrick",
                  "score": 2.1e-05,
                  "token": 3499,
                  "token_str": " Patrick",
              },
              {
                  "sequence": "My name is Te",
                  "score": 2e-05,
                  "token": 2941,
                  "token_str": " Te",
              },
              {
                  "sequence": "My name is Clara",
                  "score": 2e-05,
                  "token": 13606,
                  "token_str": " Clara",
              },
          ],
      )
  
      outputs = unmasker("My name is <mask> <mask>", top_k=2)
  
      self.assertEqual(
          nested_simplify(outputs, decimals=6),
          [
              [
                  {
                      "score": 2.2e-05,
                      "token": 35676,
                      "token_str": " Maul",
                      "sequence": "<s>My name is Maul<mask></s>",
                  },
                  {
                      "score": 2.2e-05,
                      "token": 16416,
                      "token_str": "ELS",
                      "sequence": "<s>My name isELS<mask></s>",
                  },
              ],
              [
                  {
                      "score": 2.2e-05,
                      "token": 35676,
                      "token_str": " Maul",
                      "sequence": "<s>My name is<mask> Maul</s>",
                  },
                  {
                      "score": 2.2e-05,
                      "token": 16416,
                      "token_str": "ELS",
                      "sequence": "<s>My name is<mask>ELS</s>",
                  },
              ],
          ],
      )
  
imports: import gc
  import unittest
  from transformers import MODEL_FOR_MASKED_LM_MAPPING, TF_MODEL_FOR_MASKED_LM_MAPPING, FillMaskPipeline, pipeline
  from transformers.pipelines import PipelineException
  from transformers.testing_utils import backend_empty_cache, is_pipeline_test, is_torch_available, nested_simplify, require_tf, require_torch, require_torch_accelerator, slow, torch_device
  from .test_pipelines_common import ANY
label_desc: Use image node_id 3 for calling the FillMaskPipelineTests obj's underlying member method code with example usage: obj.test_small_model_pt() without return types