code: def test_roberta_enc_dec_shared_params(self):
      # 3 distinct embeddings
      _, enc_dec = get_toy_model("cpu", architecture="roberta_enc_dec")
      self.assertSharing(
          enc_dec,
          [
              ["encoder.embed_tokens.weight"],
              ["decoder.embed_tokens.weight"],
              ["decoder.output_projection.weight"],
          ],
      )
  
      # 2 distinct embeddings, one for encoder, one for decoder
      _, enc_dec = get_toy_model(
          "cpu",
          architecture="roberta_enc_dec",
          share_decoder_input_output_embed=True,
      )
      self.assertSharing(
          enc_dec,
          [
              ["encoder.embed_tokens.weight"],
              [
                  "decoder.embed_tokens.weight",
                  "decoder.output_projection.weight",
              ],
          ],
      )
  
      # shared embeddings
      _, enc_dec = get_toy_model(
          "cpu",
          architecture="roberta_enc_dec",
          share_all_embeddings=True,
      )
      self.assertSharing(
          enc_dec,
          [
              [
                  "encoder.embed_tokens.weight",
                  "decoder.embed_tokens.weight",
                  "decoder.output_projection.weight",
              ]
          ],
      )
  
imports: import functools
  import unittest
  from typing import Any, Dict, Sequence
  import fairseq
  import fairseq.options
  import fairseq.tasks
  import torch
  from tests.utils import dummy_dictionary
label_desc: Use image node_id 4 for calling the RobertaTest obj's underlying member method code with example usage: obj.test_roberta_enc_dec_shared_params() without return types