code: def test_get_auto_learning_rate(
      text_encoder: Optional[Dict[str, Any]], expected_lr: float
  ):
      input_features = [{"name": "bin1", "type": "binary"}]
      if text_encoder is not None:
          input_features.append(
              {"name": "text1", "type": "text", "encoder": text_encoder}
          )
  
      config = {
          "input_features": input_features,
          "output_features": [{"name": "bin2", "type": "binary"}],
          TRAINER: {
              "train_steps": 1,
              "learning_rate": "auto",
          },
          DEFAULTS: {
              TEXT: {
                  ENCODER: {
                      # Note that encoder defaults are all or nothing: if the encoder type is overridden, trainable
                      # here is ignored
                      TYPE: "electra",
                      TRAINABLE: True,
                  }
              }
          },
      }
  
      config = ModelConfig.from_dict(config)
      lr = get_auto_learning_rate(config)
      assert lr == expected_lr
  
imports: from typing import Any, Dict, Optional
  import pytest
  from ludwig.constants import DEFAULTS, ENCODER, TEXT, TRAINABLE, TRAINER, TYPE
  from ludwig.schema.model_config import ModelConfig
  from ludwig.utils.heuristics import get_auto_learning_rate
label_desc: Use image node_id 1 for calling a global function with example usage: test_get_auto_learning_rate(text_encoder, expected_lr) without return types