code: def set_multitask_loss_weight(self, task_name, weight=0.0):
      self.multitask_loss_weight[task_name] = weight
  
imports: import logging
  import math
  from collections import OrderedDict
  import torch
  from fairseq import utils
  from fairseq.logging import metrics
  from fairseq.criterions import register_criterion
  from fairseq.criterions.ctc import CtcCriterion
  from fairseq.criterions.label_smoothed_cross_entropy_with_rdrop import RdropLabelSmoothedCrossEntropyCriterion, RdropLabelSmoothedCrossEntropyCriterionConfig, duplicate_input
  from fairseq.criterions.tacotron2_loss import Tacotron2Criterion, Tacotron2CriterionConfig
label_desc: Use image node_id 2 for calling the MultitaskCriterion obj's underlying member method code with example usage: obj.set_multitask_loss_weight(task_name, weight) without return types