code: def get_config(runlocal=""):
      """Gets ViT config for chrmID task with (chromosome+metaphase) input."""
  
      runlocal = bool(runlocal)
  
      config = ml_collections.ConfigDict()
      config.experiment_name = "chrmID-vit"
      # Dataset.
      config.dataset_name = "chrmID_metaphase_context"
      config.data_dtype_str = "float32"
      config.dataset_configs = ml_collections.ConfigDict()
  
      # Model.
      config.model_name = "duplex_vit_classification"
      config.model = ml_collections.ConfigDict()
      version, patch = VARIANT.split("/")
      config.model.hidden_size = HIDDEN_SIZE[version]
      config.model.classifier = "token"
      config.model.dropout_rate = 0.0
      config.model.patches = ml_collections.ConfigDict()
      config.model.encoder = ml_collections.ConfigDict()
      config.model_dtype_str = "float32"
      # Input encoder
      config.model.patches.input_size = [int(patch), int(patch)]
      config.model.encoder.input = ml_collections.ConfigDict()
      config.model.encoder.input.num_heads = NUM_HEADS[version]
      config.model.encoder.input.mlp_dim = MLP_DIM[version]
      config.model.encoder.input.num_layers = NUM_LAYERS[version] // 3
      config.model.encoder.input.attention_dropout_rate = 0.0
      config.model.encoder.input.dropout_rate = 0.0
      config.model.encoder.input.stochastic_depth = 0.0
      # Context encoder
      config.model.patches.context_size = [int(patch), int(patch)]
      config.model.encoder.context = ml_collections.ConfigDict()
      config.model.encoder.context.num_heads = NUM_HEADS[version]
      config.model.encoder.context.mlp_dim = MLP_DIM[version]
      config.model.encoder.context.num_layers = NUM_LAYERS[version] // 3
      config.model.encoder.context.attention_dropout_rate = 0.0
      config.model.encoder.context.dropout_rate = 0.0
      config.model.encoder.context.stochastic_depth = 0.0
      # # Fused encoder
      config.model.encoder.fused = ml_collections.ConfigDict()
      config.model.encoder.fused.num_heads = NUM_HEADS[version]
      config.model.encoder.fused.mlp_dim = MLP_DIM[version]
      config.model.encoder.fused.num_layers = NUM_LAYERS[version] // 3
      config.model.encoder.fused.attention_dropout_rate = 0.0
      config.model.encoder.fused.dropout_rate = 0.0
      config.model.encoder.fused.stochastic_depth = 0.0
  
      # Training.
      config.trainer_name = "duplex_vit_classification_trainer"
      config.optimizer = "adam"
      config.optimizer_configs = ml_collections.ConfigDict()
      config.optimizer_configs.beta1 = 0.9
      config.optimizer_configs.beta2 = 0.999
      config.optimizer_configs.weight_decay = 0.1
      config.explicit_weight_decay = None  # No explicit weight decay
      config.l2_decay_factor = None
      config.max_grad_norm = 1.0
      config.label_smoothing = None
      config.num_training_epochs = 500
      # Log eval summary (heavy due to global metrics.)
      config.log_eval_steps = 1000
      # Log training summary (rather light).
      config.log_summary_steps = 100
      config.batch_size = 8 if runlocal else 512
      config.rng_seed = 42
      config.init_head_bias = -10.0
  
      # Learning rate.
      steps_per_epoch = _TRAIN_SIZE // config.batch_size
      total_steps = config.num_training_epochs * steps_per_epoch
      base_lr = 3e-3
      config.lr_configs = ml_collections.ConfigDict()
      config.lr_configs.learning_rate_schedule = "compound"
      config.lr_configs.factors = "constant*linear_warmup*linear_decay"
      config.lr_configs.total_steps = total_steps
      config.lr_configs.end_learning_rate = 1e-6
      config.lr_configs.warmup_steps = 10_000
      config.lr_configs.base_learning_rate = base_lr
  
      # Logging.
      config.write_summary = True
      config.xprof = True  # Profile using xprof.
      config.checkpoint = True  # Do checkpointing.
      config.checkpoint_steps = 5000
      config.debug_train = False  # Debug mode during training.
      config.debug_eval = False  # Debug mode during eval.
  
      if runlocal:
          config.count_flops = False
  
      return config
  
label_desc: Use image node_id 1 for calling a global function with example usage: get_config(runlocal) and returns: config