code: def on_step_end(
      self,
      args: TrainingArguments,
      state: TrainerState,
      control: TrainerControl,
      **kwargs,
  ):
      # apply adapter fusion weight regularization on the value matrix
      model = kwargs.pop("model")
      if self.trainer.train_adapter_fusion:
          fusion_reg_loss = (
              model.base_model.get_fusion_regularization_loss()
          )
          if fusion_reg_loss is not None:
              fusion_reg_loss.backward()
  
imports: import os
  import re
  from typing import Callable, Dict, List, Optional, Tuple, Union
  import torch
  from torch import nn
  from torch.utils.data.dataset import Dataset
  from transformers import PreTrainedModel, Seq2SeqTrainer, Trainer, __version__
  from transformers.configuration_utils import PretrainedConfig
  from transformers.data.data_collator import DataCollator
  from transformers.modeling_utils import unwrap_model
  from transformers.tokenization_utils_base import PreTrainedTokenizerBase
  from transformers.trainer_callback import TrainerCallback, TrainerControl, TrainerState
  from transformers.trainer_utils import EvalPrediction
  from transformers.training_args import TrainingArguments
  from transformers.utils import CONFIG_NAME, WEIGHTS_NAME, is_sagemaker_mp_enabled, logging
  from .composition import AdapterCompositionBlock, Fuse
label_desc: Use image node_id 3 for calling the AdapterTrainerCallback obj's underlying member method code with example usage: obj.on_step_end(args, state, control) without return types