code: def __init__(
      self,
      *,
      is_1d: bool,
      encoder: str = "vanilla",
      decoder: str = "vanilla",
      encoder_config: Optional[Dict[str, Any]] = None,
      decoder_config: Optional[Dict[str, Any]] = None,
  ):
      super().__init__()
      self.encoder = make_encoder(
          encoder, encoder_config or {}, is_1d=is_1d
      )
      self.decoder = make_decoder(
          decoder, decoder_config or {}, is_1d=is_1d
      )
  
imports: import torch
  from torch import nn
  from torch import Tensor
  from typing import Any
  from typing import Dict
  from typing import Optional
  from typing import NamedTuple
  from cftool.types import tensor_dict_type
  from .encoder import make_encoder
  from .encoder import IEncoder
  from .encoder import EncoderMixin
  from .decoder import make_decoder
  from .decoder import IDecoder
  from ...misc.toolkit import auto_num_layers
label_desc: Use image node_id 1 to create a new PureEncoderDecoder object from inherited base classes: nn, EncoderDecoderMixin with example: obj = PureEncoderDecoder()