code: def load_pretrained_speech_text_components(
      cls, checkpoint, component_pairs
  ):
      if not PathManager.exists(checkpoint):
          raise IOError("Model file not found: {}".format(checkpoint))
      state = load_checkpoint_to_cpu(checkpoint)
      for component_type, component in component_pairs:
          if isinstance(component, nn.parameter.Parameter):
              component.data.copy_(state["model"][component_type])
          else:
              component_state_dict = OrderedDict()
              for key in state["model"].keys():
                  if key.startswith(component_type):
                      component_subkey = key[len(component_type) + 1 :]
                      component_state_dict[component_subkey] = state[
                          "model"
                      ][key]
              component.load_state_dict(
                  component_state_dict, strict=True
              )
      return state
  
imports: import logging
  from collections import OrderedDict, namedtuple
  import torch.nn
  from fairseq import checkpoint_utils, utils
  from fairseq.checkpoint_utils import load_checkpoint_to_cpu
  from fairseq.file_io import PathManager
  from fairseq.models import register_model, register_model_architecture
  from fairseq.models.speech_to_text import SpeechWavTransformerEncoder, StackedSpeechWavTransformerEncoder, TransformerDecoder
  from fairseq.models.transformer import TransformerEncoder
  from .s2t_dualinputtransformer import DualInputEncoder, DualInputS2TTransformerModel, TransformerMultiInputDecoder
label_desc: Use image node_id 10 for calling the DualInputWavTransformerModel obj's underlying member method code with example usage: obj.load_pretrained_speech_text_components(cls, checkpoint, component_pairs) and returns: state