code: def __init__(
      self,
      config: "PretrainedConfig",
      task: str = "feature-extraction",
      int_dtype: str = "int64",
      float_dtype: str = "fp32",
      use_past: bool = False,
      use_past_in_inputs: bool = False,
      behavior: ConfigBehavior = ConfigBehavior.MONOLITH,
      preprocessors: Optional[List[Any]] = None,
      legacy: bool = False,
  ):
      super().__init__(
          config=config,
          task=task,
          int_dtype=int_dtype,
          float_dtype=float_dtype,
          use_past=use_past,
          use_past_in_inputs=use_past_in_inputs,
          behavior=behavior,
          preprocessors=preprocessors,
          legacy=legacy,
      )
  
      from ..tasks import TasksManager
  
      self.is_decoder_with_past = False
  
      # Set up the encoder ONNX config.
      encoder_onnx_config_constructor = (
          TasksManager.get_exporter_config_constructor(
              exporter="onnx",
              task="feature-extraction",
              model_type=config.encoder.model_type,
          )
      )
      self._encoder_onnx_config = encoder_onnx_config_constructor(
          config.encoder,
          int_dtype=int_dtype,
          float_dtype=float_dtype,
          preprocessors=preprocessors,
      )
      self._normalized_config.ENCODER_NORMALIZED_CONFIG_CLASS = (
          self._encoder_onnx_config._normalized_config
      )
  
      # Set up the decoder ONNX config.
      decoder_onnx_config_constructor = (
          TasksManager.get_exporter_config_constructor(
              exporter="onnx",
              task="feature-extraction",
              model_type=config.decoder.model_type,
          )
      )
      kwargs = {}
      if issubclass(
          decoder_onnx_config_constructor.func, OnnxConfigWithPast
      ):
          self.is_decoder_with_past = True
          kwargs["use_past"] = use_past
      else:
          self.use_past = False
  
      if use_past and not self.is_decoder_with_past:
          raise ValueError(
              f"The decoder part of the encoder-decoder model is {config.decoder.model_type} which does not need "
              "past key values."
          )
  
      self._decoder_onnx_config = decoder_onnx_config_constructor(
          config.decoder,
          int_dtype=int_dtype,
          float_dtype=float_dtype,
          preprocessors=preprocessors,
          **kwargs,
      )
      if issubclass(
          decoder_onnx_config_constructor.func,
          OnnxSeq2SeqConfigWithPast,
      ):
          self._decoder_onnx_config = (
              self._decoder_onnx_config.with_behavior(
                  self._behavior,
                  use_past=kwargs["use_past"],
                  use_past_in_inputs=use_past_in_inputs,
              )
          )
  
      self._normalized_config.DECODER_NORMALIZED_CONFIG_CLASS = (
          self._decoder_onnx_config._normalized_config
      )
  
      if isinstance(
          self._decoder_onnx_config, OnnxSeq2SeqConfigWithPast
      ):
          self._past_key_values_generator = (
              DummySeq2SeqDecoderTextInputGenerator,
              DummySeq2SeqPastKeyValuesGenerator,
          )
      else:
          self._past_key_values_generator = (
              DummySeq2SeqDecoderTextInputGenerator,
              DummyPastKeyValuesGenerator,
          )
  
      self.DUMMY_INPUT_GENERATOR_CLASSES += (
          self._past_key_values_generator
      )
  
imports: from collections import OrderedDict
  from pathlib import Path
  from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple, Union
  from transformers.utils import is_tf_available
  from ...onnx import merge_decoders
  from ...utils import DummyAudioInputGenerator, DummyBboxInputGenerator, DummyInputGenerator, DummyPastKeyValuesGenerator, DummySeq2SeqDecoderTextInputGenerator, DummySeq2SeqPastKeyValuesGenerator, DummyTextInputGenerator, DummyVisionInputGenerator, is_diffusers_available, logging
  from .base import ConfigBehavior, OnnxConfig, OnnxConfigWithPast, OnnxSeq2SeqConfigWithPast
  from .constants import ONNX_DECODER_MERGED_NAME, ONNX_DECODER_NAME, ONNX_DECODER_WITH_PAST_NAME
  from .model_patcher import DecoderModelPatcher
label_desc: Use image node_id 1 to create a new EncoderDecoderBaseOnnxConfig object from inherited base classes: OnnxSeq2SeqConfigWithPast with example: obj = EncoderDecoderBaseOnnxConfig(config, task, int_dtype, float_dtype, use_past, use_past_in_inputs, behavior, preprocessors, legacy)