code: def _transform_config_to_namedtuple(config):
      args = namedtuple(
          "config",
          [
              "seq_len",
              "label_len",
              "pred_len",
              "output_attention",
              "moving_avg",
              "enc_in",
              "d_model",
              "embed",
              "freq",
              "dropout",
              "dec_in",
              "factor",
              "n_heads",
              "d_ff",
              "activation",
              "e_layers",
              "c_out",
              "loss",
              "optim",
              "lr",
              "lr_scheduler_milestones",
          ],
      )
      args.seq_len = config["seq_len"]
      args.label_len = config["label_len"]
      args.pred_len = config["pred_len"]
      args.output_attention = config.get("output_attention", False)
      args.moving_avg = config.get("moving_avg", 25)
      args.enc_in = config["enc_in"]
      args.d_model = config.get("d_model", 512)
      args.embed = config.get("embed", "timeF")
      args.freq = config["freq"]
      args.dropout = config.get("dropout", 0.05)
      args.dec_in = config["dec_in"]
      args.factor = config.get("factor", 3)
      args.n_heads = config.get("n_heads", 8)
      args.d_ff = config.get("d_ff", 2048)
      args.activation = config.get("activation", "gelu")
      args.e_layers = config.get("e_layers", 2)
      args.c_out = config["c_out"]
      args.d_layers = config.get("d_layers", 1)
      args.loss = config.get("loss", "mse")
      args.optim = config.get("optim", "Adam")
      args.lr = config.get("lr", 0.0001)
      args.lr_scheduler_milestones = config.get(
          "lr_scheduler_milestones", None
      )
      args.seed = config.get("seed", None)
  
      return args
  
file_path: BigDL/python/chronos/src/bigdl/chronos/model/autoformer/Autoformer.py
imports: import torch
  import torch.nn
  from .layers.Embed import DataEmbedding_wo_pos
  from .layers.AutoCorrelation import AutoCorrelation, AutoCorrelationLayer
  from .layers.Autoformer_EncDec import Encoder, Decoder, EncoderLayer, DecoderLayer, my_Layernorm, series_decomp
  import torch.optim
  import pytorch_lightning
  from collections import namedtuple
  from ..utils import PYTORCH_REGRESSION_LOSS_MAP
label_desc: Use image node_id 3 for calling a global function with example usage: _transform_config_to_namedtuple(config) and returns: args