code: def test_regularize_for_adaprune_in_roberta(self, device: str):
      _, model = get_toy_model(
          device=device,
          architecture="roberta_base",
          mha_reg_scale_factor=0.000375,
          ffn_reg_scale_factor=0.000375,
      )
      sample = mk_sample("en", device, batch_size=1)
      task_loss, _ = model.forward(**sample["net_input"])
      head_loss = model._get_adaptive_head_loss()
      ffn_loss = model._get_adaptive_ffn_loss()
      loss = task_loss.sum() + head_loss + ffn_loss
      loss.backward()
  
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 10 for calling the RobertaTest obj's underlying member method code with example usage: obj.test_regularize_for_adaprune_in_roberta(device) without return types