code: def has_trainable_encoder(config: ModelConfig) -> bool:
      for feature in config.input_features.to_list():
          encoder = feature.get("encoder", {})
          if encoder.get("trainable", False):
              # TODO(travis): we assume here that False is always the default, which may not be true. We should dervice
              # this from the schema.
              return True
  
      return False
  
file_path: ludwig/ludwig/utils/config_utils.py
imports: from typing import Any, Dict, Set, Union
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.constants import DECODER, ENCODER, IMAGE, INPUT_FEATURES, MODEL_ECD, MODEL_LLM, MODEL_TYPE, PREPROCESSING, SEQUENCE, TEXT, TIMESERIES, TYPE
  from ludwig.features.feature_registries import get_input_type_registry
  from ludwig.schema.model_config import ModelConfig
  from ludwig.types import FeatureConfigDict, FeatureTypeDefaultsDict, PreprocessingConfigDict
label_desc: Use image node_id 5 for calling a global function with example usage: has_trainable_encoder(config) and returns: False, True