code: def test_shared_state(session):
      config = {
          "input_features": [
              {
                  "name": "text_feature",
                  "type": "text",
                  "encoder": {"type": session["encoder"]},
              },
              {"name": "text_feature_2", "type": "text"},
          ],
          "output_features": [
              {"name": "number_output_feature", "type": "number"},
              {
                  "name": "category_feature",
                  "type": "category",
                  "preprocessing": {"missing_value_strategy": "bfill"},
              },
          ],
          "defaults": {
              "text": {"encoder": {"type": session["encoder"]}}
          },
      }
  
      if session["sess_id"] == 1:
          del config[OUTPUT_FEATURES][1]["preprocessing"]
  
      if session["sess_id"] == 2:
          del config[INPUT_FEATURES][0]["encoder"]
          del config[DEFAULTS]
  
      config_obj = ModelConfig.from_dict(config)
  
      if session["sess_id"] == 0:
          config_obj.input_features.text_feature.encoder.max_sequence_length = (
              10
          )
          config_obj.input_features.text_feature.tied = "text_feature_2"
  
          assert (
              config_obj.defaults.text.encoder.max_sequence_length
              is None
          )  # Test no link w/ defaults config
          assert (
              config_obj.input_features.text_feature.tied
              == "text_feature_2"
          )  # Test tied set as expected
  
      if session["sess_id"] == 1:
          config_obj.output_features.number_output_feature.loss.weight = (
              2.0
          )
  
          # Test previous edits to config don't carry over
          assert (
              config_obj.output_features.category_feature.preprocessing.missing_value_strategy
              == "drop_row"
          )
          assert (
              config_obj.defaults.text.encoder.max_sequence_length
              is None
          )  # Test no link w/ previous encoder config
          assert (
              config_obj.input_features.text_feature.tied is None
          )  # Test no link w/ previous text feature config
          assert (
              config_obj.output_features.number_output_feature.loss.weight
              == 2.0
          )  # Test loss weight set as expected
  
      if session["sess_id"] == 2:
          assert (
              config_obj.input_features.text_feature.encoder.type
              == "parallel_cnn"
          )
          assert (
              config_obj.output_features.number_output_feature.loss.weight
              == 1.0
          )  # Test no link previous loss config
          assert (
              config_obj.defaults.text.encoder.max_sequence_length
              is None
          )  # Test no link w/ first encoder config
          assert config_obj.input_features.text_feature.tied is None
  
imports: import os
  from tempfile import TemporaryDirectory
  from typing import Any, Dict, Optional, Union
  import pytest
  import yaml
  from ludwig.constants import ACTIVE, BASE_MODEL, CLIP, COLUMN, COMBINER, DECODER, DEFAULT_VALIDATION_METRIC, DEFAULTS, DEPENDENCIES, ENCODER, HYPEROPT, INPUT_FEATURES, INPUT_SIZE, LOSS, MODEL_ECD, MODEL_GBM, MODEL_LLM, MODEL_TYPE, NAME, NUM_CLASSES, OPTIMIZER, OUTPUT_FEATURES, PREPROCESSING, PROC_COLUMN, REDUCE_DEPENDENCIES, REDUCE_INPUT, TIED, TRAINER, TYPE
  from ludwig.error import ConfigValidationError
  from ludwig.schema.decoders.base import ClassifierConfig
  from ludwig.schema.encoders.text_encoders import BERTConfig
  from ludwig.schema.features.augmentation.image import RandomBlurConfig, RandomRotateConfig
  from ludwig.schema.features.image_feature import AUGMENTATION_DEFAULT_OPERATIONS
  from ludwig.schema.features.number_feature import NumberOutputFeatureConfig
  from ludwig.schema.features.text_feature import TextOutputFeatureConfig
  from ludwig.schema.llms.quantization import QuantizationConfig
  from ludwig.schema.model_config import ModelConfig
  from ludwig.schema.utils import BaseMarshmallowConfig, convert_submodules
label_desc: Use image node_id 15 for calling a global function with example usage: test_shared_state(session) without return types